Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expires in url_for method starts from epoch time not relative to now #81

Open
prolificcoder opened this issue May 20, 2013 · 0 comments

Comments

@prolificcoder
Copy link

url_for method requires adding current time in epoch secs + expiry time
eg:
AWS::S3::S3Object.url_for(file_name, bucket, :expires_in => Time.now.tv_usec + 60 * 30)

Documentation says otherwise

# Expiration relative to now specified in seconds

    #   # (Expires in 3 hours)
    #   S3Object.url_for('beluga_baby.jpg', 
    #                    'marcel', 
    #                    :expires_in => 60 \* 60 \* 3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant