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

Set fog_authenticated_url_expiration #1836

Closed
mbajur opened this issue Jan 12, 2016 · 3 comments
Closed

Set fog_authenticated_url_expiration #1836

mbajur opened this issue Jan 12, 2016 · 3 comments
Labels

Comments

@mbajur
Copy link

mbajur commented Jan 12, 2016

Hello everyone.

I was curious - is that possible to temporay overwrite default fog_authenticated_url_expiration on model.uploader_column.url() level? I want to use a default expiration time everywhere in my app but also be able to set longer expiration times for images displayed in mails (cause sometimes mail arrives or is opened a way longer than after 10 minutes and that causes the images being broken).

I would imagine it more or less like that: model.photo.url(:medium, fog_authenticated_url_expiration: 6000)

Thanks in advance!

@thomasfedb
Copy link
Contributor

Hi @mbajur, that functionality is not currently supported, although it could be implemented in CarrierWave::Storage::Fog#authenticated_url. If you'd like to provide a pull request with such an implementation, I'd be happy to look over it.

@FantasticJimmy
Copy link

FantasticJimmy commented Aug 27, 2018

Has this been implemented since 2016?

@blombard
Copy link

blombard commented Nov 8, 2022

For the internet people, yes it has been implemented here: #2397

expire_at = options[:expire_at] || ::Fog::Time.now.since(@uploader.fog_authenticated_url_expiration.to_i)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants