humanmade / S3-Uploads

The WordPress Plugin to Store Uploads on Amazon S3
1.95k stars 392 forks source link

Is it possible to enable s3 uploads but have it upload to the server as well instead of one or the other? #626

Closed ChrisFlannagan closed 1 year ago

ChrisFlannagan commented 1 year ago

I may have missed something obvious but this doesn't seem possible. We have a editorial team of hundreds of people around the world so telling them all to stop uploading images while we run our migration to s3 is near impossible. Also we want to test heavily before actual pointing our front end image URLs to cloudfront. So ideally we'd be able to turn on this plugin so its uploading any new files to s3 but also to our server (pantheon) so we can continue to point the front end imgs to the pantheon URLs while we verify everything is working and migrated.

We have around 400,000 images/pdfs to migrate

rmccue commented 1 year ago

No, this is not currently possible.

When you upload a file, PHP stores it on the local filesystem. In the upload processing, WordPress moves this file (using move_uploaded_file) to the uploads directory; S3 Uploads replaces the uploads directory path with the appropriate s3://... stream wrapper path. As there's only one uploads directory, S3 Uploads does not support storing two copies of the file.

As we don't need this functionally, we don't plan on adding it to S3 Uploads per our support policy.