arc
arc copied to clipboard
add request_dir for allowing the url to be different then that of the storage path.
This is for allowing the url to be different then that of the storage path.
The point of this was to allow me to set the storage path differently for my uploader via
# Override the storage directory:
def storage_dir(version, {file, scope}) do
"priv/uploads/photos"
end
def request_dir(version, {file, scope}) do
"uploads/photos"
end
This allowed me to use plug static via
plug Plug.Static,
at: "/uploads/photos", from: {:digitalcakes, "priv/uploads/photos"}, gzip: false
request_dir defaults to storage_dir
ouch, welp it was worth a try... I guess.
Is it there any chance that this PR would be merged?
I basically reimplemented the same feature in my app. (+ asset_host for local storage). Should I create new PR with my changes too?
@scarfacedeb I hope so too. I can see we still need a spec to test the behavior. I might get around to writing that later this evening, but have some things at work to deal with first.
If you have something to contribute to whats already here, have a different / better implementation, or you would like to write the above mentioned spec, it would be very appreciated. If you want to contribute to whats already here, i think you can just base your commits on this PR, and make a new PR that includes cakes commits.
Hello so sorry for the long reply. I will see if I can make sometime this week to update the pr. Thanks for the review.
@digitalcake No problem :smile: Your work is appreciated
Why is this not merged yet? This is a problem I'm facing for a long time now. 7 months have passed and nothing happened so far.
Would you be please so kind and merge this?
Sorry I've foolishly have deleted my local repo for this while cleaning up my account.
I've also found using ExAws.S3.presigned_url
a much more useful case for uploading files via the client and don't think I will be trying to use Arc in the future so sorry to say I'm gonna pass on this.
I'll keep this open for anyone who wishes to try and finish what I started.