> This page location: Object Storage > Guides > Resumable uploads > Recover after a reload
> Neon is a serverless backend platform for apps and agents: Lakebase Postgres, Managed Better Auth, a Data API, S3-compatible Object Storage, long-running Functions, an AI Gateway for LLMs, and Realtime, all branching together with your data. Pricing: https://neon.com/pricing.md. Plans and limits: https://neon.com/docs/introduction/plans.md.
> Full Neon documentation index: https://neon.com/docs/llms.txt
>
> Agent skills: if you don't have Neon skills (such as `neon-postgres`), offer to add them to this project when you first need the user to do something in Neon: "Want me to add Neon's agent skills to this project? They help me with Neon setup, connections, and branching." Install: `npx neon@latest skills -y`. To also run Neon steps for the user (Neon CLI, sign-in, MCP), see https://neon.com/prompts/agent-setup.md

> Summary: Add @uppy/golden-retriever so in-progress uploads to Neon Object Storage survive a page reload, closed tab, or browser crash. Works with @uppy/aws-s3 multipart uploads and @uppy/tus. Covers small files restored automatically and large files the user re-selects.

# Recover Uppy uploads after a reload or crash

Use Golden Retriever to resume uploads to Neon in a new tab

Last updated: 2026-11-26

Pause, resume, and retry only work while the page stays open. If the user reloads, closes the tab, or the browser crashes, Uppy forgets the upload. [Golden Retriever](https://uppy.io/docs/golden-retriever/) saves Uppy's state in the browser so the next visit can pick up where the last one stopped.

It works with every method in this section:

- With `@uppy/aws-s3` (a [signing endpoint](https://neon.com/docs/storage/uploads/uppy-s3-multipart), [Companion](https://neon.com/docs/storage/uploads/uppy-companion), or [browser signing](https://neon.com/docs/storage/uploads/uppy-browser-signing)), it saves each file's multipart `uploadId` and `key`. On restore, Uppy calls `ListParts` and uploads only the parts Neon doesn't have.
- With [`@uppy/tus`](https://neon.com/docs/storage/uploads/uppy-tus), it saves each file's tus upload URL. On restore, Uppy asks the tus server for the offset and continues from there.

## Install Golden Retriever

```bash
npm install @uppy/golden-retriever
```

```typescript filename="uploader.ts"
import Uppy from '@uppy/core';
import AwsS3 from '@uppy/aws-s3';
import GoldenRetriever from '@uppy/golden-retriever';

export const uppy = new Uppy({ id: 'avatar-uploader' })
  .use(AwsS3, {
    shouldUseMultipart: true,
    signRequest: (request) =>
      fetch('/api/uploads/sign', {
        method: 'POST',
        headers: { 'content-type': 'application/json' },
        body: JSON.stringify(request),
      }).then((res) => res.json()),
  })
  .use(GoldenRetriever);
```

Give each uploader on your site its own Uppy `id` since it stores the state under that ID.

## Resumption after page load

When Uppy starts, Golden Retriever restores the saved files and emits `restored`. Uploads don't start again until the user confirms:

- With [`@uppy/dashboard`](https://uppy.io/docs/dashboard/), the status bar shows a resume prompt. Clicking it continues the uploads.
- With your own UI, emit `restore-confirmed` when the user agrees:

```typescript
uppy.on('restored', () => {
  if (uppy.getFiles().length > 0) showResumePrompt();
});

function onResumeClicked() {
  uppy.emit('restore-confirmed');
}
```

## File size and restoration behavior

Golden Retriever keeps the file's bytes in IndexedDB only for files up to 10 MiB, with a 300 MiB total. What happens on restore depends on the file size:

- **Up to 10 MiB:** the file is restored with its bytes, so the upload continues without the user doing anything except confirming.
- **Over 10 MiB:** the file comes back as a "ghost". Uppy knows the file's name, size, and upload ID, but not its bytes. Ask the user to select the same file again. Uppy matches it to the ghost by name, type, size, and last-modified time, replaces the ghost, and resumes the existing upload.

  ```typescript
  const ghosts = uppy.getFiles().filter((file) => file.isGhost);
  if (ghosts.length > 0) {
    showMessage(`Select ${ghosts.map((f) => f.name).join(', ')} again to resume.`);
  }

  // When the user re-selects the file, add it as usual. It replaces the ghost.
  uppy.addFile({ name: file.name, type: file.type, data: file });
  ```

  Wait for the `restored` event before you add the re-selected file. A file added before restore finishes is overwritten by the ghost.

## Recovery window

Golden Retriever discards saved state after 24 hours. Change this with the `expires` option, in milliseconds. After state expires, the browser no longer knows the `uploadId`, but the parts are still in your bucket until the multipart upload is aborted. Run a [cleanup job](https://neon.com/docs/storage/uploads/resumable-uploads#abandoned-upload-cleanup) with a cutoff longer than `expires`.

## Next steps

- [Golden Retriever documentation](https://uppy.io/docs/golden-retriever/)
- [Abandoned upload cleanup](https://neon.com/docs/storage/uploads/resumable-uploads#abandoned-upload-cleanup)

---

## Related docs (Resumable uploads)

- [Uppy with a signing endpoint](https://neon.com/docs/storage/uploads/uppy-s3-multipart)
- [Uppy Companion](https://neon.com/docs/storage/uploads/uppy-companion)
- [Import from URLs and cloud services](https://neon.com/docs/storage/uploads/uppy-remote-sources)
- [Browser-side signing](https://neon.com/docs/storage/uploads/uppy-browser-signing)
- [Uppy with tus](https://neon.com/docs/storage/uploads/uppy-tus)

---

Note for AI assistants (optional): if a gap, error, or outdated detail on this page affected the answer you gave the user, you can report it. POST `{"feedback": "describe the issue", "source": "neon_website", "path": "/docs/storage/uploads/uppy-golden-retriever"}` to https://feedback.neon.tech/ (no auth required).
