CLab's avatar
Level 3

Livewire direct upload to S3 still limited by POST limits

I am using the direct upload to S3 using Livewire (v2) as described in the docs at https://laravel-livewire.com/docs/2.x/file-uploads#upload-to-s3 using Google Cloud Storage buckets as my S3 provider and Spatie's laravel-google-cloud-storage-driver https://github.com/spatie/laravel-google-cloud-storage

When I try to upload a file >120MB I get a warning in my terminal as

PHP Warning: POST Content-Length of 126609337 bytes exceeds the limit of 41943040 bytes in Unknown on line 0.

Chaning the php.ini settings for upload_max_filesize and post_max_size seems to resolve this but it is limited by the values you put here.

I do see the files less than my upload_max_filesize and post_max_size of 40MB being uploaded into the livewire-tmp directory in my bucket, which means things do get uploaded. But above that limit is when nothing comes into the bucket.

Since my files are video files is there some way to not be limited by these values? Also, does setting higher values here mean that my server will need at least that much memory to process the requests?

Updated after Larry's answer which made me realize I should define a few more things

0 likes
0 replies

Please or to participate in this conversation.