A "dirty" solution would be to use s3fs to mount the remote S3 bucket and then use Laravel local filesystem storage pointing to the s3fs mounted directory.
Jan 1, 2016
4
Level 1
Transfer uploaded file directly to S3, without double waiting time
My users upload large images and I store them all in Amazon S3 bucket. After the image has uploaded to bucket, I present user with hyperlink to the image.
The problem:
- User wants to upload 10MB file
- It takes 10 seconds to travel from user's computer to my server
- After server has received last bit, it starts uploading to S3. Another 10 seconds.
- After 20 seconds in total, user is presented with hyperlink.
I think these 20 seconds can be reduced by half, to 12 or so. If PHP were smart enough to start uploading to S3 not after the last bit arrived, but after the first bit arrived from user - don't wait for all file to be uploaded, but start streaming on the fly.
Is this possible?
Please or to participate in this conversation.