Always generate the same .jp2 filename for the same image
benjamingeer opened this issue · 2 comments
This request comes from BEOL via @subotic:
The use case is that a project does a bulk import with images. During testing, they find some mistakes in the data. They fix the mistakes and do the bulk import again. But now the images all have different filenames in Sipi. It would be easier if the same images always got the same filenames.
Could this be done by providing a method in SipiImage
, which could be called from Lua scripts, to generate a unique filename based on the content of the SipiImage
(i.e. the pixels and any metadata)?
What would happen if a file with that name already existed in Sipi? I guess Sipi could use the existing file, because it would be guaranteed to be identical. Then if multiple users uploaded the exact same file for use in different Knora resources, it would actually be stored only as one file in Sipi.