In our system we rely on filenames to generate consistent download URLs from S3.
In Carrierwave v3 the deduplicate mechanism generates filenames suffix, and I understand that it's related to this change, but it breaks our system when upgrading to v3.
Expected behavior (as of v2.2.5):
- Upload
dummy_file.pdf
- See
dummy_file.pdf in S3 folder
- Re-upload
dummy_file.pdf
- See
dummy_file.pdf in S3 folder
Current behavior (v3.1.2):
- Upload
dummy_file.pdf
- See
dummy_file.pdf in S3 folder
- Re-upload
dummy_file.pdf
- See
dummy_file(2).pdf in S3 folder
We managed to implement a workaround in our system with this file uploader:
class FileUploader < CarrierWave::Uploader::Base
def deduplicated_filename
filename
end
end
Would it be possible to at least have an "overwrite" option that would rename the new file to match the expected filename ? That would be a step 6 in the process explained here.