M
M
Moshiwa2022-01-25 17:38:41
Laravel
Moshiwa, 2022-01-25 17:38:41

What is the difference between local and public laravel file system drivers?

I read the documentation, public makes these files available from the Internet (does this mean that I can only send public files to third-party services?)
Is it different that I can open the file saved using public by link?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey delphinpro, 2022-01-25
@Moshiwa

You are not talking about drivers, but about disks.
Drivers are different, there are 4 available "local", "ftp", "sftp", "s3". These are ways to store files. The local driver is your server's file system.
About disks:
By default, a disk is localmapped to /storage/appand not publicto /storage/app/public.
The catalog /storage/app/public, in turn, is linked to. /public/storage
Hence the conclusion: the disk publicis available from the Internet. disk localis not. But if you upload a file on the
disk along the path, then it will also be available atlocal'piblic/image.png'site.com/storage/image.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question