I am having a problem with different users uploading files with the same name that are being overwritten by the Polymorphic Paperclip plugin. What I would like to do is enter the current user id in the URL / path. Is it possible? Would I be better off generating a random name?
Here are my current values: url and: path in asset.rb:
:url => "/assets/:id/:style/:basename.:extension",
:path => ":rails_root/public/assets/:id/:style/:basename.:extension"
What I would like to do is the following:
:url => "/assets/#{current_users_id}/:id/:style/:basename.:extension",
:path => ":rails_root/public/assets/#{current_users_id}/:id/:style/:basename.:extension"
source
share