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
{{ message }}
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.
If the name attribute changes, paperclip does not "update" or "move" the external file by renaming it (in this case). This is also true for non S3 storage settings.
This is problematic for obvious reasons because everyone using paperclip who wants to use any attribute in the path must handle updates manually.
Personally I consider this a basic or even expected feature that others may benefit greatly from having so before I consider contributing a PR with this support, I'd like to ask:
Is there any known reason not to integrate this behavior into paperclip?
Has this been attempted elsewhere and failed before already?
Are others interested in this feature as much as I think they are?
The text was updated successfully, but these errors were encountered:
Hi @dwickwire! A feature like this will add complexity. If you know you are changing an attribute that impact your attachment path, wouldn't be easier to just update the image attribute after saving the model?
Hello @uiltondutra, that's an interesting idea which seems simpler, but it wouldn't actually satisfy the missing behavior this feature suggests, it circumvents it. Updating an image attribute after saving the model doesn't change the remote/local path structure on disk thus doesn't satisfy the given expectation that when a file is moved, or when a directory is renamed, that it should take effect wherever relevant.
Moving files or renaming directories (locally or remotely) adds behavior, yes. However calling it "complex" suggests its outside the scope of what Paperclip is for, file management is what paperclip does.
Hello,
Given a path definition which contains attributes such as:
If the
name
attribute changes, paperclip does not "update" or "move" the external file by renaming it (in this case). This is also true for non S3 storage settings.This is problematic for obvious reasons because everyone using paperclip who wants to use any attribute in the path must handle updates manually.
This appears to be a known "issue" and is addressed in the wiki here:
https://github.com/thoughtbot/paperclip/wiki/Changing-attachment-:path
Personally I consider this a basic or even expected feature that others may benefit greatly from having so before I consider contributing a PR with this support, I'd like to ask:
The text was updated successfully, but these errors were encountered: