Open nkwsy opened 4 months ago
I think option 2 using a folder naming convention was the one discussed when Kate and Paul were in the office recently. So I felt that would be great to implement as 1st iteration.
A few things to consider on the folder structure,
2024-06-15_UR011
but the image paths will be something like 2024/2024-06-15_UR011/DCIM/100MEDIA/SYFW0174.JPG
100MEDIA
and 101MEDIA
if there are too many images, which will then have duplicates of the image name in each folder, so just pulling all jpg to a top level folder won't work w/o renaming some things. Could make SdUploader just upload images sequentially, or combine folder w/ image title.2024/2024-01-30_prologis_02/DCIM/THUMB/sendlist/W1000235.JPG
which will cause duplicates Definitely could be sorted but a consideration. Basically comes down to either doing the logic on the SdUploader / local server end before it sends to S3 or building that into the node logic. I think it would make sense to just run some sort of REGEX on the path to pull out what the deployment level folder is and in the mongo document for the image the URI link is arbitrary. But I can also see an argument the other way.
Either way I have no strong feelings one way or another, but wanted to call this out
Camera data is synced from the local NAS to an S3 database. We would need to pull images from the S3 and assign them to the deployment by adding the
_Id
from thedeploymentID
to the media input. Current model for images are located inmodels/cameratrap/Media.js
Currently in
app/actions/UploadActions.js
we are using the S3 api to upload images for plants and such. We would need to modify to pull images for cameratraps to then create mongo document about each image.In most cases all of the photos from a deployment are in the same root folder. Might make sense to pull sample images from the folder and allow user to assign all images in that folder to a specific deployment. It could be made easier by pulling the the EXIF value for Date/Time Original and seeing what deployments start & end dates overlap with them. This will fail if the camera date was set incorrectly.
I see a few ways to achieve this, we can do one or multiple of these
The final consideration is we do not need to necessarily assign each image to a deployment immediately. They could be created and used for adding observations then assigned to deployment at a later time.