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

Fetch file from rootFolder instead of IAppData to use StreamResponse #519

Merged
merged 1 commit into from
Jul 5, 2018

Conversation

juliusknorr
Copy link
Member

@juliusknorr juliusknorr commented Jul 5, 2018

This will fix the download of huge attachments, where the whole file was put in memory. This PR adds a workaround to manually get the file using IRootFolder instead of IAppData, so we can stream the file.

A proper fix would be to use fopen, which can be used once nextcloud/server#10122 is available in the supported Nextcloud versions.

  • Fix tests

@juliusknorr juliusknorr force-pushed the bugfix/noid/stream-attachment-download branch from c5be2b1 to cb25643 Compare July 5, 2018 16:42
@codecov
Copy link

codecov bot commented Jul 5, 2018

Codecov Report

Merging #519 into master will increase coverage by 0.06%.
The diff coverage is 88.23%.

@@            Coverage Diff             @@
##           master     #519      +/-   ##
==========================================
+ Coverage   80.34%   80.41%   +0.06%     
==========================================
  Files          45       45              
  Lines        1496     1511      +15     
==========================================
+ Hits         1202     1215      +13     
- Misses        294      296       +2

@juliusknorr juliusknorr merged commit e959afb into master Jul 5, 2018
@juliusknorr juliusknorr deleted the bugfix/noid/stream-attachment-download branch July 5, 2018 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant