php - Laravel download file from S3 route (not open in browser) -


i have following route load file given url, need download file (mp4, jpg, pdf) rather open in browsers in built viewer.

// download cdn route route::get('cdn/{url}', function($url)     {            return redirect::away($url);         })->where('url', '(.*)'); 

all files stored externally apparently resource::download() wouldn't work.

all have available me amazon url: https://mybucket.s3.amazonaws.com/folder/filename.pdf

any suggestions on how force browser download file s3?

in case simple anchor link downloading file ...

<a href="https://mybucket.s3.amazonaws.com/folder/filename.pdf"> file name </a> 

Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -