> For the complete documentation index, see [llms.txt](https://quantumphp.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://quantumphp.gitbook.io/docs/packages/storage/overview.md).

# Overview

Storage gives Quantum a single API for local files, cloud-backed filesystems, and uploaded files.

Use it when you want one app-level interface for file operations across `local`, `dropbox`, and `gdrive`.

## What it provides

* `fs()` helper for filesystem access
* `FileSystem` wrapper around the selected adapter
* `UploadedFile` for upload validation and persistence
* adapter selection through `config/fs.php`

## Quick example

```php
fs()->put(storage_dir() . '/exports/users.json', json_encode($users));

if (fs()->exists(storage_dir() . '/exports/users.json')) {
    $json = fs()->get(storage_dir() . '/exports/users.json');
}
```

## Upload example

```php
$uploadedFile = new UploadedFile($_FILES['avatar']);
$uploadedFile->setName('profile-photo');
$uploadedFile->save(uploads_dir() . '/users');
```

## Operational constraints

* Unknown adapter names fail during resolution.
* Cloud adapters keep the same wrapper API, but backend semantics differ (especially naming vs ID-based access).
* `UploadedFile` validation depends on local temporary upload files.
* Image modifications are best for local saves.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://quantumphp.gitbook.io/docs/packages/storage/overview.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
