-
Notifications
You must be signed in to change notification settings - Fork 36
Renaming dropbox url's #36
Comments
This proc is evaluated every time an URL is requested, it should change when the Also, you might consider using Paperclip's standard |
When I type these into rails console with the code above: item = Item.first
item.picture_1 = File.open("#{Rails.root}/public/abc.png")
item.save
item.id = 909 #different id
item.save
item.picture_1.url #returns path not found
config.paperclip_defaults = {
storage: :dropbox,
dropbox_credentials: Rails.root.join("config/dropbox.yml"),
dropbox_visibility: 'public',
path: ":id/:attachment" } then default path doesnt work.
|
I agree with everything you said.
[1, 2, 3].each do |n|
has_attached_file :"picture_#{n}", path: ":id_#{n}.:extension"
end The reason why these things are still here is that I don't use Dropbox uploads, nor Paperclip. CarrierWave also has a |
Thanks for the quick response I'll give CarrierWave a look. I'd really appreciate if we can have a fix for these issues as well. |
Since I don't use Paperclip anymore, I don't have the time/will to fix these things. I have tried to keep the code pretty and maintainable (although tests could be better), so I will happily accept pull requests. |
It's very difficult at the moment to change the Model.attachment.url's(dropbox url's).
Example:
Also I have to manually add a callback when the models referred to self.id changes.(eg. if we change the id of an item that has an attachment, dropbox url wont change automatically so samemodel.picture_1.url would cause an error).
I think we need a better API + handling for dropbox uploads.
The text was updated successfully, but these errors were encountered: