# Files

Store assets your tests reference at runtime, including file uploads, fixtures, and sample documents.

The Files page stores assets your tests reference at runtime. The most common case is the file you are uploading in a "test the upload form" step. Rather than rely on a path on a developer's laptop, you upload the file once to Testsnag and the test points to a stable URL. It is also useful for pinning fixtures (a sample CSV, a known-good PDF, a synthetic user avatar) so they are available to every test without having to bundle them anywhere.

![The Files page listing three uploaded files with type, size, upload date, and a copy URL action.](https://testsnag.com/images/docs/building-blocks/files-1-library.r1.jpg)

Marked on the screenshot:
- Upload a file your tests can attach in an Upload step.
- Copy a signed download URL, valid for 15 minutes.
- Delete, which is blocked while any test still references the file.

## Uploading files

Upload from the Files page in the sidebar. Each file gets a temporary signed URL (valid for 15 minutes) you can copy when you need to share or inspect the file directly. Inside test runners, signed URLs are generated freshly per run so the test always has access. You can store anything up to 50 MB per file, which covers virtually every realistic test asset. Previews show automatically for images so you can confirm visually that you have uploaded the right asset, and metadata (MIME type, size, upload date) is shown alongside the file name to help you spot duplicates before they accumulate.

## How files are stored

Files are stored privately. Each download URL is signed and short-lived, so the underlying object cannot be enumerated by guessing paths or shared indefinitely. To use a file in a test, add an Upload step in the editor and pick the file from your library. The runner resolves the file to a fresh signed URL just before each run, scoped to the test owner so other accounts cannot reference your assets.

## Deleting a file

Deleting a file is blocked while any of your tests still reference it through an Upload step. The dialog will list which tests are using the file so you can update them first. Once no test references it, deleting is permanent. To replace a file while keeping the references stable, upload the new version, switch the Upload step in each test that needs the new file, then delete the old one.

The same protection covers app builds. A file used as the build for an iOS or Android test cannot be deleted while that test still points at it, so a mobile test cannot lose its build without you noticing.
