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

Monkey patch to get filename from headers #480

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

maxime-carbonneau
Copy link

Dropbox put the filename in the headers. This patch retrieve the filename with the *_url= method

@markevans
Copy link
Owner

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:

  1. rename filename -> name_from_url
  2. in apply, use 'name' => name_from_url || name_from_response(response) where name_from_response is a new private method (which name_from_url should probably be too)

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

Successfully merging this pull request may close these issues.

None yet

2 participants