-3

I have one file uploading form in Drupal 8 where I am uploading 3 different assets and they might be around 2gb or more in size.

I have the s3fs module enabled and configured properly, but (due to temporary storage) it is consuming lot of time to upload to web server. First it uploads in the "/tmp" directory and then to "s3". I have also tweaked apache settings to handle large file uploads.

Is there any way to speedup this upload process? If it's possible how to fetch the uploaded file properties for edit action on the same form?

2

The s3fs module page mentions the use case of uploading very large files directly to S3:

If your users need to upload very large files to your site, you might want to use the S3FS CORS Upload module. It enables CORS-based uploads, allowing files to be uploaded directly to S3, rather than being routed through your server.

The s3fs module alone only has a S3 client for PHP and will not do what you want. However it is still useful as the recommended module depends on it.

  • I have checked with the same already but still with CORS module file uploads in the "/tmp" directory first and then to "s3" which take same time with S3FS and via cloudfront, browser given me bad response as large file takes too much time to upload.. – Vaibhav Gidde Aug 20 at 10:20
0

A simple workaround will be to upload the file directly to S3 using AWS CLI.

Just in order to create the file in your Drupal database upload a small file with the same name which will later be overwritten by the file you are going to upload using AWS CLI.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.