Closed AppyCat closed 6 years ago
see https://github.com/stavro/arc/issues/85 and related issues for more
Duplicate of https://github.com/stavro/arc/issues/85
@pedep I don't think this issue is the same as #85, it is the same problem reported at issue #69 but you closed both...
I'm having the same problem that @AppyCat reported. When I use the functions to retrieve the right filename is returned but at the database it saves the original filename from upload. The problem of doing that is if I change my filename or thumbnails strategy I lose compatibility with the old ones... Maybe use a JSON field to store all version names?
@williamweckl These issues may not be exactly the same, but they are similar enough that i believe solving one would mean solving all of them.
I'm not sure storing JSON in the database is the correct approach, since that would pose problems with databases that does not support embedded schema.
Do you think you could elaborate on what behavior you expect when changing the filename
method? I'm pretty sure, that if you change your naming strategy in something like carrierwave, you would also have problems?
The below works to rename the file, but it does not rename what is stored in the database as the name of the file.
def filename(version, _) do "#{UUID.uuid1()}" end
The file name in the database remains the original file name, instead of the overridden version from the uuid above.
If the filename and what is stored in the db differ, the system is broken. Carrierwave updates the db with the new overridden file name. Is it possible to do the same with arc_ecto?