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

Always generate the same .jp2 filename for the same image #271

Open
benjamingeer opened this issue Nov 16, 2018 · 2 comments
Open

Always generate the same .jp2 filename for the same image #271

benjamingeer opened this issue Nov 16, 2018 · 2 comments
Assignees
Milestone

Comments

@benjamingeer
Copy link
Contributor

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)?

@benjamingeer
Copy link
Contributor Author

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.

@mrivoal
Copy link

mrivoal commented Nov 16, 2018

In the bulk-import data provided in this issue, this is precisely the use case you are mentionning: the exact same file is used in several resources. So I guess that's a very good idea.

@subotic subotic added this to the Backlog milestone Feb 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants