Closed basz closed 8 years ago
@basz , just add it in configuration option will work:
$source = '/path/to/large/file.zip';
$size = 6 * 1024 * 1024; // 6MB, default is 5MB
$uploader = new MultipartUploader($s3Client, $source, [
'bucket' => 'your-bucket',
'key' => 'my-file.zip',
'part_size' => $size
]);
Yes, what I actually meant to ask was how to configure this method when using the client upload method... Used as here: https://github.com/thephpleague/flysystem-aws-s3-v3/blob/master/src/AwsS3Adapter.php#L569
But upon deeper infection I think the objectuploader handler this with the mup_threshold setting. Unfortunatly getting the size won't work on remote streams, so even when I hardcode the setting multipart uploads will be done, resulting in the 'md5-x' etag format.
https://github.com/aws/aws-sdk-php/blob/master/src/S3/ObjectUploader.php#L116-L120
I have found that s3cmd cp fileX fileX
will change the etag from 'md5-x' to 'md5', so I think I'll write a script to do that...
How do i configure the part_size option of the S3 adapter? I might need to increase it to get a 'real' etag md5 hash.