AtlasOfLivingAustralia / image-service

Image repository and tiling services
https://images.ala.org.au
0 stars 17 forks source link

exportDataset needs to populate alternate_filename #161

Open patkyn opened 2 years ago

patkyn commented 2 years ago

Refer: https://github.com/AtlasOfLivingAustralia/data-management/issues/732 (example 2).

As discussed with @sbearcsiro, in order for image sync to link back the images, the alternate_filename can be used to match back to the original url when original_filename when the url differs

images=# select original_filename, alternate_filename from image where image_identifier = '2adce2cd-9c8f-43fc-be2f-8d8badf783ce';
                       original_filename                        |                                           alternate_filename                                            
----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------
 NSW_Trip_Mutawintji_May_2014_RAW-_0967-CR2_DxO_DeepPRIME_2.jpg | {https://biocollect.ala.org.au/image?id=NSW_Trip_Mutawintji_May_2014_RAW-_0967-CR2_DxO_DeepPRIME_2.jpg}
(1 row)
patkyn commented 1 year ago

After discussion with @djtfmartin, the exportDataset should output the alternative_filenames and original_filenames as identifier to the same imageID in the export for eg:

fileName1,uuid1 alternativeFileName1,uuid1

yasima-csiro commented 1 year ago

The solution need to be modified to have image records for original file name and each alternative_filenames as below.

uuid -1 | original_filename uuid -1 | alternate_filename-1 uuid -1 | alternate_filename-2

yasima-csiro commented 1 year ago

Working branch - https://github.com/AtlasOfLivingAustralia/image-service/tree/feature/export-dataset-alternate-filenames