Skip to content

use fopen directly when reading objects from s3#6975

Merged
nickvergessen merged 1 commit intomasterfrom
s3-read-object-fopen
Nov 1, 2017
Merged

use fopen directly when reading objects from s3#6975
nickvergessen merged 1 commit intomasterfrom
s3-read-object-fopen

Conversation

@icewind1991
Copy link
Member

Bypassing curl/guzzle.

This might help with errors when dealing with large downloads

@icewind1991 icewind1991 added this to the Nextcloud 13 milestone Oct 26, 2017
Copy link
Member

@MorrisJobke MorrisJobke left a comment

Choose a reason for hiding this comment

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

Tested and at least works with the existing files I have in my test environment.

/** @var StreamInterface $body */
$body = $result['Body'];
$request = \Aws\serialize($command);
$opts = array(
Copy link
Member

Choose a reason for hiding this comment

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

Could you use [] instead of array()

Copy link
Member Author

Choose a reason for hiding this comment

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

done

Signed-off-by: Robin Appelman <robin@icewind.nl>
@codecov
Copy link

codecov bot commented Oct 27, 2017

Codecov Report

Merging #6975 into master will decrease coverage by <.01%.
The diff coverage is 57.14%.

@@             Coverage Diff              @@
##             master    #6975      +/-   ##
============================================
- Coverage     52.82%   52.82%   -0.01%     
  Complexity    22802    22802              
============================================
  Files          1442     1442              
  Lines         88562    88565       +3     
  Branches       1349     1349              
============================================
- Hits          46787    46783       -4     
- Misses        41775    41782       +7
Impacted Files Coverage Δ Complexity Δ
lib/private/Files/ObjectStore/S3ObjectTrait.php 54.71% <57.14%> (-3.29%) 11 <0> (ø)
core/js/js.js 61.27% <0%> (-0.56%) 0% <0%> (ø)
lib/private/Server.php 83.47% <0%> (-0.13%) 124% <0%> (ø)
apps/files_trashbin/lib/Trashbin.php 72.53% <0%> (+0.24%) 136% <0%> (ø) ⬇️
lib/private/Security/CertificateManager.php 92.07% <0%> (+0.99%) 39% <0%> (ø) ⬇️

@MorrisJobke MorrisJobke added the 3. to review Waiting for reviews label Oct 27, 2017
@MorrisJobke MorrisJobke requested a review from blizzz October 27, 2017 11:00
@nickvergessen nickvergessen merged commit defc4bf into master Nov 1, 2017
@nickvergessen nickvergessen deleted the s3-read-object-fopen branch November 1, 2017 09:58
@MorrisJobke
Copy link
Member

Does a backport make sense here?

@schiessle
Copy link
Member

@MorrisJobke yes, we need to backort it, please review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants