Large file upload fail

Created on 12 March 2025, 29 days ago

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.

πŸ’¬ Support request
Status

Active

Version

1.1

Component

Miscellaneous

Created by

πŸ‡ΊπŸ‡ΈUnited States nikm

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @nikm
  • πŸ‡ΊπŸ‡ΈUnited States nikm

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

  • πŸ‡ΊπŸ‡ΈUnited States nikm
  • First commit to issue fork.
  • @j-barnes opened merge request.
  • πŸ‡ΊπŸ‡ΈUnited States j-barnes

    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.

  • πŸ‡ΊπŸ‡ΈUnited States ramu_bharu Bridgewater, Massachusetts

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

  • πŸ‡ΊπŸ‡ΈUnited States Sunny-Lee

    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.

Production build 0.71.5 2024