You can always just use regular php to do that.
$file = file_get_contents('https://url-of-file-on-S3');
Then save the file locally.
Or use the Storage: https://laravel.com/docs/5.6/filesystem#retrieving-files
Has anyone ever successfully moved a file from AWS to a local file path? I'm trying to load a file using Laravel Excel on a worker but I'm using Heroku so I can't store the file when I upload it. So I first send the file to an S3 bucket. That's working great. But now when the job actually runs on the worker. I need to pull that file from the S3 bucket to a local path so laravel excel can read the file in from the local file system and import the excel file data.
Has anyone ever copied a file from an S3 bucket to a local path successfully? Any help would be greatly appreciated.
Thanks in advance!
I've already dug into the Laravel Excel docs and github to confirm 100% that laravel excel does not support external URLs for loading in an import file. Which really stinks. :(
By default, the "local" disk puts files in /storage/app/public. Did you change that? So when you put("/storage/templates/" it's actually putting it in /storage/app/public/storage/templates (with storage repeated)?
Please or to participate in this conversation.