I'm trying to configure Drupal to upload large videos (eventually goal is ~300mb, but currently testing with ~50mb files) to S3 through my Drupal site running on an EC2 instance.
I have configured and tried both the Amazon S3 and Storage API modules. When trying to upload a small file around 5mb, everything is fine and works perfectly. However, when I try with a large file, I receive the following error:
Warning: filesize(): stat failed for storage-field-storage-test://[FILE NAME].mp4 in file_save() (line 601 of /var/www/includes/file.inc).
This error is the same for both the Amazon S3 and Storage API modules.
It turns out that the large videos are not being uploaded to S3, which explains the error message.
I am able to upload files directly to S3 okay and I am able to upload large files to local storage just fine as well (the PHP upload limit is set well above what I'm trying). What I don't understand is what could be causing the failure with the large file sizes between Drupal and S3. Any suggestions?
post_max_size
,upload_max_filesize
andmemory_limit
(or what these parameters are called in your hosting). Set them all to 100MB or so. When you do, it will become a Drupal question. unless you can't, and they have to stay below 50MB - then tell us what they are and that you are looking for workaround.upload_max_filesize
argument wasn't specified in my php.ini. It's curious that I was able to upload large files directly the EC2 instance, but transferring them to S3 failed.