# My uploaded files disappeared after I deployed.

URL: https://antideploy.com/blog/uploads-disappear-after-a-deploy

Anything your app saves to its own disk is gone after the next deploy. Nothing errors. Use a bucket for files.

## At a glance

- **What happened**: The disk was replaced
- **The fix**: A private S3 bucket
- **No error shown**: Which makes it easy to miss
- **Flagged before build**: Antideploy warns about it

Published 7 October 2026. Facts checked 7 October 2026. 1 min read.

## The short answer

Your app runs in a container, and the container is replaced on every deploy. Its disk goes with it. Files your app saved there, such as uploads or generated images, are gone, and nothing reports an error. Save files to a bucket instead. Antideploy creates a private S3 bucket for your app, and your agent can set it up in one step.

## How to tell

- **The app uses `multer`, `fs.writeFile` or a local `uploads` folder.** Antideploy flags uploads written to the app's own disk before it builds anything.
- **Uploads work, then vanish after the next deploy or restart.** A restart or a scale-to-zero has the same effect.

## How to fix it

### 1. Ask your agent for a bucket

Say: "Store uploads in a bucket, not on disk." Your agent creates a private S3 bucket for the app and writes its variables into your `.env`.

### 2. Use an S3 client in your code

Replace the code that writes to disk with an upload to the bucket. The AWS SDKs and boto3 read the variables from the environment.

### 3. Serve files through your app, or with a signed link

The bucket is private. Hand the visitor a signed link, or serve the file through your app.

See [how to add file uploads to your app](https://antideploy.com/blog/how-to-add-file-uploads-to-your-app) for the code.

## Here's where it stops.

A platform that only tells you what it is good at is one you find the edges of in production. These are the ones to know before your first deploy.

### The disk forgets

Anything written to local disk is gone on the next deploy. Apps that speak S3 get a bucket instead.

## Upload questions, answered.

Anything else? Write to us and a person answers.

[support@antideploy.com](mailto:support@antideploy.com)

### Can I recover the lost files?

No. Once a deploy replaced the disk, those files are gone. Start saving to the bucket from now on.

### Does this happen on every plan?

Yes. The disk is temporary on every plan.

### How much can I store in a bucket?

Storage is not metered or capped today. The limit is the number of buckets in your plan: 1 on Free, 2 on Go, 3 on Pro and 5 on Scale.

## More guides, and the platform.

Each platform page covers one part of Antideploy: what it does, where it stops and the questions people ask. [See the whole platform](https://antideploy.com/platform), or [all the guides](https://antideploy.com/blog).

- [How to add file uploads to your app](https://antideploy.com/blog/how-to-add-file-uploads-to-your-app): Uploads on disk vanish on every deploy. Ask for a private S3 bucket and upload with any S3 client.
- [My SQLite database resets after every deploy](https://antideploy.com/blog/sqlite-database-resets-after-a-deploy): SQLite keeps data in a file, and the disk is replaced on every deploy. Move to Postgres.
- [Why does my app work on localhost but not online?](https://antideploy.com/blog/why-does-my-app-work-on-localhost-but-not-online): Nine common reasons, how to check each one, and how to fix it.

- [File storage](https://antideploy.com/platform/file-storage)
- [Deployments](https://antideploy.com/platform/deployments)
- [Hosting](https://antideploy.com/platform/hosting)

Facts on this page were checked against the live platform on 7 October 2026.

## Deploy something. Start with one sentence.

Paste one sentence into your coding agent, click Approve once, and get a live link. No card, no trial clock.

To set this up, give your coding agent this sentence:

```text
Set this project up to deploy on Antideploy. Fetch https://antideploy.com/agent.md and follow it.
```
