Laravel 7 Browser dont Download file

  laravel, php

i’m running Xampp on my windows 10 machine , and i have a file called ‘files.txt’ inside my directory project .

[…]storageapppublic

my config/filesystem.php looks like .

    'disks' => [

    'local' => [
        'driver' => 'local',
        'root' => storage_path('app'),
        'permissions' => [
            'file' => [
                'public' => 0664,
                'private' => 0600,
            ],
            'dir' => [
                'public' => 0775,
                'private' => 0700,
            ],
        ],
    ],

on my controller i am calling the file to download

return response()->download(storage_path("apppublicfiles.txt"),'down.txt');

i am receive 200 status Ok , the headers content i receive:

Content-Disposition: attachment; filename=files.txt , on response on the browser Xhr devtools i could see the content of the file , but unhappy the download dont happen .

someone could help me ?

Source: Laravel

Leave a Reply