S
S
Sergey Khlopov2021-04-16 21:55:47
Laravel
Sergey Khlopov, 2021-04-16 21:55:47

How to safely save a file with a token so that no one can access it?

Hello, please tell me, you need to save the file with the token safely so that no one can download this file in any way. The filesystems config contains the following disks:

'disks' => [

        'local' => [
            'driver' => 'local',
            'root' => storage_path('app'),
        ],

        'public' => [
            'driver' => 'local',
            'root' => storage_path('app/public'),
            'visibility' => 'public',
        ],

        's3' => [
            'driver' => 's3',
            'key' => 'your-key',
            'secret' => 'your-secret',
            'region' => 'your-region',
            'bucket' => 'your-bucket',
        ],

    ],

And I'm thinking whether the file will be safely saved if it is saved to the local disk?
Laravel version 5.2

Thanks in advance for your reply

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey delphinpro, 2021-04-16
@Shlop

If you save the file above DOCUMENT_ROOT, and if you don't programmatically screw up by giving this file to just anyone, no one will get access to it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question