I started a new project via Laravel 5.1 and came to the part where I need to download a file with s3 (AWS). I noticed that keeps files in xml format.
How do I download a file to s3? Here's what I have so far:
Controller
//$key = urldecode($key);
//This way found file as .xml but can't get zip file?!
$key = str_replace('.zip', '.xml', $firmware->key);
$test = Storage::disk('s3')->get('db/'.$key);
//dd($test); this get:
FileNotFoundException in FilesystemAdapter.php line 58:
db/Toshiba\07GAH\TOSHIBA MK8007GAH-BG002H0-Y6HNW0EOW.xml*
$data = (array) simplexml_load_string($test) or die("Can't read XML for $manifest");
//dd($data);
//dd($test);
return response()->download('db/'.$data['key']);
This is error I see in the browser when in db change "\" in "/"