#1 India's Top IT Training Institute

×

About Uncodemy

Know more about who we are and what we stand for.

About Us

About Us

Discover our mission to equip individuals with essential IT skills and industry expertise.

Read More →
UnCodeMy Gallery

UnCodeMy Gallery

Explore highlights from our IT training sessions and success stories.

Read More →
×

Free Resources

Learn, practice and plan your career — bilkul free.

Tutorials

Tutorials

Step-by-step written tutorials to learn any technology at your own pace.

Read More →
Free Counselling

Free Counselling

Book a free video counselling session and pick the right course for you.

Read More →
Online Compiler

Online Compiler

Write, run and test your code online — no setup required.

Read More →

Storing Files in the Public and Storage Folders

Laravel gives uploaded and generated files a couple of natural homes, and choosing correctly between them affects both security and how easily files can be served to visitors.

The storage Folder

By default, files are stored inside storage/app, which isn't directly accessible from the web. This is the right choice for anything that shouldn't be publicly reachable by guessing a URL, like private documents or user-specific files.

The public Folder

Files that do need to be accessible directly through a URL, like profile pictures or product images, are typically stored using the "public" disk, which points to storage/app/public. A symbolic link connects this folder to the actual public/storage path so the web server can serve it.

LocationPublicly Accessible?Typical Use
storage/appNo, by defaultPrivate documents, internal files
storage/app/publicYes, via symbolic linkProfile photos, product images
public/storageYes, directlyThe publicly served link to the folder above

Setting Up the Public Link

Manually managing paths across these different locations gets repetitive fast — which is exactly the problem Laravel's Storage facade is designed to solve.

Ready to master Laravel Training Course?

Join Uncodemy's hands-on Laravel program and build real, production-ready applications.

Explore Course