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

fix: AWS file upload #6707

Merged
merged 3 commits into from
Jan 1, 2020
Merged

Conversation

AmitAronovitch
Copy link
Contributor

Fixes #6706

Short description of what this resolves:

Changes proposed in this pull request:

  • In storage helper, open uploaded files as bytestream 'rb' instead of unicode
  • For aws storage, avoid re-loading the data to memory (use the fileobject for the boto call).

Checklist

  • I have read the Contribution & Best practices Guide and my PR follows them.
  • My branch is up-to-date with the Upstream development branch.
  • The unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • All the functions created/modified in this PR contain relevant docstrings.

@codecov
Copy link

codecov bot commented Jan 1, 2020

Codecov Report

Merging #6707 into development will increase coverage by 0.06%.
The diff coverage is 89.65%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development    #6707      +/-   ##
===============================================
+ Coverage        65.61%   65.68%   +0.06%     
===============================================
  Files              300      300              
  Lines            15381    15404      +23     
===============================================
+ Hits             10093    10118      +25     
+ Misses            5288     5286       -2
Impacted Files Coverage Δ
tests/all/unit/api/helpers/test_storage.py 98.14% <100%> (+0.85%) ⬆️
app/api/helpers/storage.py 63.02% <72.72%> (+3.73%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cf88e99...879cda5. Read the comment docs.

@iamareebjamal iamareebjamal changed the title Aws fixes fix: AWS file upload Jan 1, 2020
@auto-label auto-label bot added the fix label Jan 1, 2020
@iamareebjamal
Copy link
Member

Thanks for the contribution

@iamareebjamal iamareebjamal merged commit 4b55ca6 into fossasia:development Jan 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

failure when saving images to aws bucket storage
2 participants