Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix resolve_file_name called twice to the same file (#1)
Hello! Thank you for your library. We identified a bug where the resolve_file_name is called twice to the same file. If we a resolve file name function like suggested in the docs: file_name = Path.basename(file.file_name, Path.extname(file.file_name)) "#{version}_#{file_name}" If that function is called twice for the same file, instead of having "thumb_filename.jpg", we end having "thumb_thumb_filename.jpg". The resolve_file_name is called first in the abstract logic: https://github.com/elixir-waffle/waffle/blob/c781d5a7e7058d297783669ad1a830bd8928c73d/lib/waffle/actions/store.ex#L134 Then again here. The code change I'm proposing basically imitates the AWS adapter that just call file.file_name: https://github.com/elixir-waffle/waffle/blob/c781d5a7e7058d297783669ad1a830bd8928c73d/lib/waffle/storage/s3.ex#L144
- Loading branch information