Problem/Motivation
I'm getting 'net::ERR_HTTP2_PROTOCOL_ERROR' only on large (100+MB) file uploads.
Steps to reproduce
s3fs and s3fs_cors lates stable version modules on Drupal 10.4.
Small file uploads are just fine, but the large ones will get uploaded, i see them in the s3 bucket through aws cli, but after showing 'Saving file...' it fails with the 'net::ERR_HTTP2_PROTOCOL_ERROR' in the console.
Help please, I ran out of ideas.
I think this is related:
https://www.drupal.org/project/s3fs_cors/issues/278915
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 3512533-large-file-upload-file-4.patch | 821 bytes | j-barnes |
Issue fork s3fs_cors-3512533
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
nikm commentedLooks like the Hosting provider limit 100MB still affects the max upload.
I thought the s3fs_cors is the solution to this...
Any advice?
Comment #3
nikm commentedComment #6
j-barnes commentedWe’re experiencing this same issue with larger file uploads. When using the widget, files are uploaded directly to S3 client-side. However, the fileInput element still retains the selected file. This means when the form is later submitted via FormData, the file is included again in the request body — even though it was already uploaded — which can cause server-side errors such as exceeding post_max_size.
I think the simple solution is just to clear the fileInput value so that FormData doesn't include the file.
Comment #7
ramu_bharu commentedThanks very much for sharing the patch. I've tested the patch and it works perfectly and I don't get any issues when i upload larger files (100+MB).
Comment #8
sunny-lee commentedLooks good here, the previous error is no longer happening with this patch. Uploaded 2 videos on various content types and both worked well with a 937.7 MB video.
Comment #9
berenddeboer commentedThank you so much @j-barnes! Working perfectly here now.
Comment #12
heddnThanks for the improvements here.