-
-
Notifications
You must be signed in to change notification settings - Fork 130
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
Allow custom Content-Disposition filename in #create_temp_url method #452
Conversation
Build succeeded.
|
@vala, LGTM. Any chance you could add some tests? Obviously we inherited disjointed tests but we've got to progressively fill up the blanks. |
temp_url_options = { | ||
:scheme => scheme, | ||
:host => host, | ||
:port => port, | ||
:path => object_path_escaped, | ||
:query => "temp_url_sig=#{sig}&temp_url_expires=#{expires}" | ||
:query => "temp_url_sig=#{sig}&temp_url_expires=#{expires}&filename=#{filename}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filename needs to be filtered out if the parameter is empty.
Actually the option need to be filtered if empty, please see inline. |
Why do we need to filter that param out ? On my Swift instance, if the filename is empty ( Isn't that your case ? |
Isn't this fixed here ? |
I'm sorry for the delay, there's a conflict now. I think this is no longer relevant as the query can contain multiple keys. Please let me know if I'm missing something, otherwise I think we can now close the PR. |
Closing now, please reopen if I missed anything. |
Hi there,
To follow up on #338 I added the support for custom file names in Swift's temp url generation method
Fog::OpenStack::Storage::Real#create_temp_url
.I found no tests for the
#create_temp_url
method so I did not write any.Note that the param is always passed, even when the
:filename
option isn't provided since the Swift service will simply use the last member of the path as the content disposition filename by default, even if thefilename=
param is passed an empty value.