expiring_url 1.month #845

Closed
maletor opened this Issue Apr 25, 2012 · 4 comments

Comments

Projects
None yet
4 participants

maletor commented Apr 25, 2012

Paperclip::Attachment should be able to take an argument like so.

attachment.expiring_url(1.month)
Contributor

sikachu commented Apr 25, 2012

It sounds like a good idea. Please send in a pull request with test.

@sikachu sikachu closed this Apr 25, 2012

You can already do this. From my very own code:

redirect_to(asset.upload.expiring_url(10.seconds, params[:style]))

maletor commented Apr 25, 2012

Please verify with 1.month. For me it spit out a utc timestamp 1 hour
in the future.

On Apr 25, 2012, at 1:03 PM, Yuval Kordov
reply@reply.github.com
wrote:

You can already do this. From my very own code:

redirect_to(asset.upload.expiring_url(10.seconds, params[:style]))

Reply to this email directly or view it on GitHub:
#845 (comment)

smudge commented Aug 2, 2012

I had to do asset.upload.expiring_url(Time.now + 1.month) to get it to work on S3. It seems that the expected value for that time parameter has changed from "amount of time before it expires" to "time since epoch when it expires."

Is this a bug, or an expected change? (I didn't see anything about it...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment