You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The server APIs provide image paths relative to its IMAGE_PATH setting, but they must be accessed by prefixing the IMAGE_ROUTE (which in turn is relative to the URL prefix, /sealog-server/).
The client then needs to also know IMAGE_ROUTE, except in the client it's known as IMAGE_PATH, and image URLs are computed through
API_ROOT_URL + IMAGE_PATH + '/' + path.basename
Instead, the server should just send the full path to where the image can be accessed. As a tradeoff to make the code change more minimal, we will make the path relative to API_ROOT_URL.
We need to make sure this works with both at-sea and shoreside image directory structures, which differ slightly. On the server, images are sorted per cruise, per camera:
The images at sea are all placed in a single directory. This is because there is no guarantee the cruiseID and/or diveID are correct at the time of capture. Only after the cruise is over and the data processor/manager have verified the cruiseID, cruise start/stop timestamps, diveID and dive start/stop timestamps can the images be safely organized by cruise/dive and camera.
In a perfect world it would be great if the image files could be organized in their intended final locations when they are created but experience has proven that this is not always possible.
The server APIs provide image paths relative to its
IMAGE_PATH
setting, but they must be accessed by prefixing theIMAGE_ROUTE
(which in turn is relative to the URL prefix,/sealog-server/
).The client then needs to also know
IMAGE_ROUTE
, except in the client it's known asIMAGE_PATH
, and image URLs are computed throughInstead, the server should just send the full path to where the image can be accessed. As a tradeoff to make the code change more minimal, we will make the path relative to
API_ROOT_URL
.We need to make sure this works with both at-sea and shoreside image directory structures, which differ slightly. On the server, images are sorted per cruise, per camera:
We're waiting for access to the at-sea computers to see how this directory structure looks.
The text was updated successfully, but these errors were encountered: