# Storage: files and photos

Keep files, photos and PDFs with your module's records, in your own workspace, with folders you declare and links that expire on their own.

Drawings, site photos, signed PDFs, spreadsheets: real work comes with files. **Storage** gives your module its own private file space in each workspace that installs it. You say which folders you need, and the platform handles the rest: the space itself, who may open what, and safe links for viewing and downloading.

## Folders your module declares

Your module lists its folders up front, such as *photos*, *drawings* or *signed*. For each folder you can set:

| Setting | What it does |
|---|---|
| **Largest file** | Refuses anything bigger, before the upload starts. |
| **Allowed file types** | Only photos, only PDFs, and so on. |
| **Link lifetime** | How long a view or download link works (15 minutes unless you say otherwise). |

Each workspace gets its own space for your module. No other module and no other workspace can reach it, by design rather than by convention.

## Who may read or write

You name one of your module's permissions for **read**, **write** and **delete**. Someone who can't hold that permission can't list, open or upload files, whatever screen they try. If you name nothing, a person needs at least *some* permission in your module.

A folder can be stricter than the rest of the module. Voice recordings or signed contracts can need their own permission, so most people never see them.

> **Per-record privacy is still your job.** "Only the person who uploaded it" is a rule your module's screens enforce. Storage checks the folder, not the record.

## Uploading from a screen, a phone or the assistant

- **From a screen.** People pick a file and it goes straight into storage, so even large files are quick. Your module keeps a note of the file on its record.
- **From a phone.** The DV Field app can drop photos taken on site straight into a module's folder, for example from a form's photo field.
- **From the AI assistant.** Your agent can be given the platform's **save file** tool: it saves a file someone attached to the chat (or a public web image) into one of your folders. With the Bridge, it can also bring in a file from a folder a person shared from their PC. See [Agent tools](article:8b4baa95-08a0-4e8e-a7e4-890815c6005b).

## Short-lived links to show or download

Files are never public. To show a photo or download a PDF, your module asks for a link that works for a few minutes and then stops. Share a record, not a link: a link copied into an email simply expires.

## Ask the Module Builder

> *"Add a Photos folder to each job, photos only, up to 20 MB each. Crew members can upload; only managers can delete."*

## For developers

```json
"storage": {
  "permissions": {"read": "JOBS.READ", "write": "JOBS.UPLOAD", "delete": "JOBS.MANAGE"},
  "folders": [
    {"name": "photos", "max_file_size_mb": 20,
     "allowed_content_types": ["image/jpeg", "image/png"]}
  ]
}
```

In a tool, `context.storage` is already set to your module and the workspace; `get_signed_url(object_key)` gives a download link.

## What storage costs

Storage is metered: the platform measures how much each module keeps, every day, and it shows on the workspace's monthly bill. Delete files nobody needs. See [What a module costs to run](article:dd966d79-6c2d-43c0-8d6e-3dff5886192d).

## Good to know

- **Keep files out of your tables.** Store the file in a folder and only its reference on the record. The module check warns when it sees files kept in a table.
- **Links last up to 7 days at most.** Keep uploads to under an hour; ask for a fresh link instead of a long one.
- **Need heavy processing on big files** (video, 3D scans)? See [Compute jobs](article:718c1478-34c2-45a4-9a02-64d61db9847c).


Source: https://datavisions.ai/docs/creators/platform-services/storage-files-and-photos
