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

Add support for bytes formatted images to submit_image and submit_gallery #1891

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

Commits on Jul 26, 2022

  1. Add support for bytes images to subreddit.py

    Files modified:
    - submit_image
    - submit_gallery
    - _validate_gallery
    - _upload_media
    - _read_and_post_media
    
    Added new import:
    - from io import BytesIO
    
    Previously, to submit an image to Reddit a filepath to an image stored on the local machine needed to be provided to PRAW to pass through to the Reddit API. This fork changes this behavior by implementing support for bytes objects through the io library. What this means in practical terms: in the original code, the filepath is referenced to retrieve the image file and convert it to bytes format anyway. Now the bytes of an image can be directly passed through while still retaining the original filepath functionality. This means an image retrieved from a server does not need to be downloaded before it can be uploaded: it's String implementation can be passed along to Reddit instead.
    redowul committed Jul 26, 2022
    Configuration menu
    Copy the full SHA
    ff844c4 View commit details
    Browse the repository at this point in the history
  2. Added bytes image support

    redowul committed Jul 26, 2022
    Configuration menu
    Copy the full SHA
    e75488d View commit details
    Browse the repository at this point in the history
  3. Updated tests

    redowul committed Jul 26, 2022
    Configuration menu
    Copy the full SHA
    0958a8c View commit details
    Browse the repository at this point in the history

Commits on Jul 27, 2022

  1. Configuration menu
    Copy the full SHA
    8a69680 View commit details
    Browse the repository at this point in the history

Commits on Jul 28, 2022

  1. Configuration menu
    Copy the full SHA
    32548cc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3838030 View commit details
    Browse the repository at this point in the history

Commits on Jul 29, 2022

  1. Adjusting tests

    redowul committed Jul 29, 2022
    Configuration menu
    Copy the full SHA
    2c9b605 View commit details
    Browse the repository at this point in the history

Commits on Aug 1, 2022

  1. Configuration menu
    Copy the full SHA
    fc07624 View commit details
    Browse the repository at this point in the history
  2. updated test_subreddit.py

    redowul committed Aug 1, 2022
    Configuration menu
    Copy the full SHA
    fb457bd View commit details
    Browse the repository at this point in the history
  3. updated test_subreddit.py

    redowul committed Aug 1, 2022
    Configuration menu
    Copy the full SHA
    7fe5070 View commit details
    Browse the repository at this point in the history
  4. updated test_subreddit.py

    redowul committed Aug 1, 2022
    Configuration menu
    Copy the full SHA
    f03eedc View commit details
    Browse the repository at this point in the history
  5. updated test_subreddit.py

    redowul committed Aug 1, 2022
    Configuration menu
    Copy the full SHA
    98c4cf4 View commit details
    Browse the repository at this point in the history

Commits on Aug 2, 2022

  1. Configuration menu
    Copy the full SHA
    681f5f5 View commit details
    Browse the repository at this point in the history
  2. All tests passing

    redowul committed Aug 2, 2022
    Configuration menu
    Copy the full SHA
    33bc677 View commit details
    Browse the repository at this point in the history

Commits on Aug 3, 2022

  1. Configuration menu
    Copy the full SHA
    b3e23ea View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    97448bc View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    11ec479 View commit details
    Browse the repository at this point in the history
  4. Updated test coverage

    redowul committed Aug 3, 2022
    Configuration menu
    Copy the full SHA
    30762fb View commit details
    Browse the repository at this point in the history

Commits on Aug 11, 2022

  1. Configuration menu
    Copy the full SHA
    ae18a50 View commit details
    Browse the repository at this point in the history
  2. improved test coverage

    redowul committed Aug 11, 2022
    Configuration menu
    Copy the full SHA
    98bf85b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9957bd2 View commit details
    Browse the repository at this point in the history