cesargb / laravel-magiclink

Create link for authenticate in Laravel without password or get private content
MIT License
385 stars 44 forks source link

File Name #34

Closed Aliakbari1994 closed 4 years ago

Aliakbari1994 commented 4 years ago

I want to change the file name when downloading the file. What can I do about this?

cesargb commented 4 years ago

@Aliakbari1994 Hello you can change the file name with DownloadAction, for this use the second argument, sample:

$action = new DownloadFileAction('text.txt', 'other_file_name.txt');

$magiclink = MagicLink::create($action);

Then you donwload the file called other_file_name.txt