dragonfly
dragonfly copied to clipboard
Monkey patch to get filename from headers
Dropbox put the filename in the headers. This patch retrieve the filename with the *_url= method
hi - please provide tests for adding functionality like this.
also I'd rather not do it by setting @filename outside of the 'filename' method.
Probably the best way would be:
- rename
filename->name_from_url - in
apply, use'name' => name_from_url || name_from_response(response)wherename_from_responseis a new private method (whichname_from_urlshould probably be too)