So on every file upload I store it in the storage folder and also send it to amazon. The amazon part makes it kind of slow. Is it supposed to be like that? It's only one file each time and the size is usually less than 1MB.
Is the server you're developing your app on getting a decent upload speed? I would run a traceroute from your server to Amazon's S3 servers to see if it's spiking in any responses.
Is Amazon's S3 service status healthy? Or is it experiencing technical difficulties?
@TechKat I'm using MAMP with PHP7. The Amazon status seems to be fine. Maybe it will get better when I will deploy it. It isn't that bad, but instead of uploading on the spot there is a lag for a second maybe. I wish I could do it in a callback way :)
Make sure you chose the closest AWS region? Other than that, there is not much to do – it's supposed to be slower than conventional uploading (more parties involved).
If AWS region is far away, it may take half a second easily just to establish an SSL connection with S3. One second for the whole process sounds reasonable!
I am doing parallel upload using drop zone.
I put two files (700KB image and 20KB Thumbnail) to Singapore S3 from Hong Kong,
Guess what, it takes 10 to 20 seconds for each ! Sometimes it even broken the 30s timeout :/
God save me.
Mine is like yours:
\Storage::disk('s3')->put($photo->cloud_raw , file_get_contents($this->file));
\Storage::disk('s3')->put($photo->cloud_thumbnail , $this->thumbnail->minimize($this->file->getRealPath()));