dimanche 13 septembre 2020

change or force name of external files on the web when user download it in laravel

I was wonder if there is a way to force user requests to a route on the laravel app to get download an external file response from that route and if the name of the file is name.type it will download to the user system as customname.type

for example,

this is the route in web.php

Route::get('/testurl',function(){
   //then some have here by some magic it will force the user to download file on an external server on the web and change the original name of the file when a user downloads it
});

I know this is a challenging work to do. ok, any expert guy and any of you guys can help me? and it is done by some kind of technics outside of the framework(in my case laravel) I will be thankful to give me some advice. thank you all



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire