-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
fog_attributes cannot be set on a per-version basis #937
Comments
@crazymykl, have you tied setting the attributes right on the uploader? Most of what CarrierWave does is move around instances of Anyway, without seeing where you're trying to make this change I can't help with it specifically - but you should be able to modify |
Here is a gist of my uploader. Hopefully it makes clear my intent, which is for all versions but one to have the attributes set one way, and that one another way. https://gist.github.com/4381362 |
Fog attributes cannot be set per uploader. If you figured out a way to override it per uploader, it wouldn't be thread safe. |
@bensie is this still the case? As I've found an SO answer that outlines how - http://stackoverflow.com/a/19851520/2200834 Still not thread-safe to define a fog_attributes per uploaded? I want to use two different 'Cache-Control' settings. |
Since the fog_attributes method is called for each version of an Uploader, I managed to set an attribute on a per-version basis by checking the version name first, like so:
@thebucknerlife you should be able to do the same, with 'Cache-Control'. |
Thanks @tory ! |
I have an uploader which behind-the-scenes gives the uploaded files UUID filenames so they can be uniquely stored in S3. The content-disposition http header is used to allow users to retrieve the files by their original names. I am adding functionality which converts the file format for one version, and would like for that version to have different fog_attributes.
The text was updated successfully, but these errors were encountered: