E
E
Eugene2018-12-12 00:36:38
Apache HTTP Server
Eugene, 2018-12-12 00:36:38

How to restrict access to files?

Hello. There are online store files that can be easily accessed via /storage/app/notes/. How to restrict access for a group of users to this directory? Thanks in advance for your
replies.
My product loading code:

$disk = $this->factory->disk('notes');
                $disk->putFileAs('',$request->file('pdf'),$pdfName);
                $disk->setVisibility(''.$pdfName,'private');

5c102d73a5ae7557651899.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sanes, 2018-12-12
@Eugene70

Disable listing in .htaccess
Options -Indexes

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question