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

CommentFileSizeAuthor
#6 3512533-large-file-upload-file-4.patch821 bytesj-barnes

Issue fork s3fs_cors-3512533

Command icon 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

nikm created an issue. See original summary.

nikm’s picture

Looks like the Hosting provider limit 100MB still affects the max upload.
I thought the s3fs_cors is the solution to this...
Any advice?

nikm’s picture

Issue summary: View changes

j-barnes made their first commit to this issue’s fork.

j-barnes’s picture

Version: 8.x-1.1 » 8.x-1.x-dev
Assigned: Unassigned » j-barnes
Category: Support request » Bug report
Priority: Normal » Major
Status: Active » Needs review
StatusFileSize
new821 bytes

We’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.

ramu_bharu’s picture

Thanks 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).

sunny-lee’s picture

Status: Needs review » Reviewed & tested by the community

Looks 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.

berenddeboer’s picture

Thank you so much @j-barnes! Working perfectly here now.

heddn made their first commit to this issue’s fork.

  • heddn committed 5b61e10d on 8.x-1.x authored by j-barnes
    Issue #3512533 by j-barnes, sunny-lee, heddn: Large file upload fail
    
heddn’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the improvements here.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.