0
votes

We have developed our application in Laravel and now we are planning to transfer it to Amazon server where we have to separate our application logic with file storage. Basically, we want to move our whole application storage to a cloud server(Amazon S3) and application logic to Amazon EC2 server.

In our system, we manipulate (resize images, merge images, make thumbnails from videos, etc) many storage files locally. We will not be going to store any files on the application server once we migrate to Amazon server. So, our concern is how we can manipulate cloud server files?

Earlier all files are present on the application server so file manipulation was easy to process but after migrating whole storage to cloud server how we can manipulate files that are on the cloud server with manipulation logic resides on the application server?

Any Response will be helpful

Thanks in advance...

1
Have you looked at Laravel's flysystem integration? laravel.com/docs/5.6/filesystem it includes an S3 driver. - Joe
Thank you @Joe for the response. We already installed mentioned package and uploaded images to Amazon S3 with provided codes at filesystem document. My question is how I should manipulate/process (resize an image, create thumb from video) any cloud storage image or video file with Laravel? Do I always need to download the file first from a cloud to the application server and then I should manipulate/process file? We will be not going to replicate/mirror the same storage on the application server again. I just need to know any proper algorithm for this similar approach. - Jitesh T

1 Answers

0
votes

To manipulate S3 file, I think first we need to download the file locally. Once, we have file locally we can apply any operation on that particular file. We can delete the local file later.

Here are the documents to directly upload from or download to a local file using the Amazon S3.

https://aws.amazon.com/blogs/developer/transferring-files-to-and-from-amazon-s3/

https://docs.aws.amazon.com/aws-sdk-php/v3/guide/

Thanks