Skip to content

Improved File.download #1019

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

Merged
merged 7 commits into from
Mar 1, 2018
Merged

Improved File.download #1019

merged 7 commits into from
Mar 1, 2018

Conversation

tsnoam
Copy link
Member

@tsnoam tsnoam commented Feb 23, 2018

  1. Added a new method File.download_as_bytearray() which returns a bytearray. Simple and straight forward for both py2 & py3.
  2. File.download() now returns a meaningful return value:
    • If download was saved to a file, return the file name.
    • If download was saved into a file-file object, return the file-like object.

Fixes #944

@tsnoam tsnoam changed the title Improved File.donwnload Improved File.download Feb 23, 2018
@tsnoam tsnoam requested a review from Eldinnie February 23, 2018 21:37
Copy link
Member

@Eldinnie Eldinnie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pushed some small fixes for the docstrings.
The rest seems good to me.

@Eldinnie Eldinnie added the 📋 pending-merge work status: pending-merge label Feb 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
📋 pending-merge work status: pending-merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

get_file_stream support
2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy