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
I'd like to add a prefix to attachment_url so that I can expose an endpoint where files can be served. Is that possible?
What I want to achieve is, after uploading file to specified storage (e.g. /route/to/nfs/folder) and having tweaked generate_location method (so it saves in something like app_folder/filename.ext), that attachment_url method returns something like this: /custom/prefix/app_folder/filename.ext. Note that I'd like this prefix only on URL, not on stored location.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi there!
I'd like to add a prefix to
attachment_url
so that I can expose an endpoint where files can be served. Is that possible?What I want to achieve is, after uploading file to specified storage (e.g.
/route/to/nfs/folder
) and having tweakedgenerate_location
method (so it saves in something likeapp_folder/filename.ext
), thatattachment_url
method returns something like this:/custom/prefix/app_folder/filename.ext
. Note that I'd like this prefix only on URL, not on stored location.Thank you very much in advance!
Beta Was this translation helpful? Give feedback.
All reactions