Have you checked this link?
https://dev.to/adam_crampton/large-file-uploads-to-an-s3-bucket-done-neatly-in-laravel-344i
Hey Guys, what would your approach be to upload a really large file? Say 500mb or larger?
I tried chunking the file, but I just cannot seem to piece the file back together properly as its always got corruption issues.
A colleague suggested uploading directly via axios to object storage. So I tried this using the S3Client class in Laravel. I use linode storage, so I have adjusted the various config items to accomodate for this:
$s3Client = new S3Client([
'region' => config('filesystems.disks.s3.region'),
'version' => 'latest',
'endpoint' => config('filesystems.disks.s3.endpoint'),
'http_continue_timeout' => 0,
]);
$cmd = $s3Client->getCommand('GetObject', [
'Bucket' => config('filesystems.disks.s3.bucket'),
'Key' => 'andy.jpg',
]);
$request = $s3Client->createPresignedRequest($cmd, '+20 minutes');
return (string) $request->getUri();
I create a signed URL using the above code, but when I try to use this URL in postman to upload a file to test, I get a SignatureDoesNotMatch error, and I just don't understand what I might be doing wrong. Any help would be most appreciated as I have been stuck here for a long while now :'(
Have you checked this link?
https://dev.to/adam_crampton/large-file-uploads-to-an-s3-bucket-done-neatly-in-laravel-344i
Please or to participate in this conversation.