Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revise how image paths are handled #1

Open
rgov opened this issue May 28, 2020 · 1 comment
Open

Revise how image paths are handled #1

rgov opened this issue May 28, 2020 · 1 comment
Assignees

Comments

@rgov
Copy link
Member

rgov commented May 28, 2020

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:

$IMAGE_PATH/
    J2-708/
        SubSea1/
            SubSea1.20130701_120515.jpg
            SubSea1.20130701_120518.jpg  

We're waiting for access to the at-sea computers to see how this directory structure looks.

@rgov rgov self-assigned this May 28, 2020
@webbpinner
Copy link
Contributor

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.

rgov pushed a commit that referenced this issue Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants