Temporary files
With hosted storage, unconfirmed uploads are deleted after 24 hours. Confirm files when the user saves.
- Automatic cleanup
- Confirm on save
Type-safe file uploads for TypeScript and React. Customizable components with hosted storage or your own provider.
No credit card required.
Copy this prompt into your coding agent.
Read https://edgestore.dev/SKILL.md and add file uploads to this application.
import { initEdgeStore } from '@edgestore/server';
import { z } from 'zod';
const es = initEdgeStore.create();
export const router = es.router({
projectFiles: es.fileBucket({
maxSize: 10 * 1024 * 1024,
accept: ['image/*', 'application/pdf'],
})
.input(z.object({ projectId: z.string() }))
.path(({ input }) => [{ project: input.projectId }]),
});
export type EdgeStoreRouter = typeof router;const { edgestore } = useEdgeStore();
const result = await edgestore.projectFiles.upload({
file,
input: { projectId: 'launch' },
onProgressChange: setProgress,
});
// Inferred from your server router.
result.url;
result.path.project;Bucket names, upload input, and returned paths are inferred. No duplicate interfaces.
With hosted storage, unconfirmed uploads are deleted after 24 hours. Confirm files when the user saves.
Set file size and type limits per bucket. Validate application input with Zod, Valibot, or another Standard Schema library.
Use your existing authentication to decide who can upload or delete files. Add protected reads with hosted EdgeStore storage.
Show progress, cancel a transfer, and control parallel uploads. Customize our React components or use your own UI.
Build file paths and metadata from typed input and user context. Work with files from your backend as well as the browser.
Add a dropzone with shadcn, then customize the code in your app.
npx shadcn@latest add https://edgestore.dev/r/single-image-dropzone.jsonUse EdgeStore’s hosted storage, connect your own cloud account, or build a provider for another service.
File hosting, a management dashboard, protected access, and image thumbnails.
Use hosted storageView plans and limitsChoose your framework to get started. React-only apps can connect to any supported backend.
“Just used this for file uploads in my new service. Really great documentation and examples. Took very little effort to integrate and test.”
@whiterabbit6768“Edgestore is a terrific solution. Many configuration choices covering a wide range of use-cases have been offered which make it super easy to use.”
@harshalranjhani“I have implemented a starter boilerplate with NextAuth, Resend and EdgeStore already set-up. Makes starting a new project a whole lot painless.”
@MarcelGateteYes. Hosted storage has a free plan, with no credit card required. See plans and limits.
Set allowed file types and maximum file sizes per bucket with accept and maxSize. See the file validation options.
Yes. Connect S3-compatible storage, Azure Blob Storage, or a custom provider.
No. Use the React client with your own UI, or copy and customize our upload components.
Yes. Pass your user context to EdgeStore and use it in your upload and delete rules. Hosted storage also supports protected file access.
Start for free. No credit card required.