You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The URL returned by Paperdragon is not the URL to the image in cases where the original filename is not unique.
Paperdragon appends characters to a non-unique filename to make it unique but it does not reflect this in the uid stored in image_meta_data: all images that have the same original filename have the same uid.
When an image is retrieved, its URL can be obtained as per the documentation:
image[:thumb].url
Because the stored uid reflects the wrong file, the returned URL is wrong.
The file is disambiguated when Dragonfly stores it (lib/dragonfly/file_data_store.rb#disambiguate). It inserts a five character string before the file extension that it derives from the current time and some randomness.
The disambiguated filename is returned by job.store (paperdragon/file/operations.rb#upload!), so it can be tested for difference and propagated if necessary. I have submitted a PR to do this.
The URL returned by Paperdragon is not the URL to the image in cases where the original filename is not unique.
Paperdragon appends characters to a non-unique filename to make it unique but it does not reflect this in the
uid
stored inimage_meta_data
: all images that have the same original filename have the sameuid
.When an image is retrieved, its URL can be obtained as per the documentation:
Because the stored
uid
reflects the wrong file, the returned URL is wrong.I have created a test application to demonstrate this issue.
The text was updated successfully, but these errors were encountered: