Object storage that works where you need it. Skip the complex setup and get back to building what matters.
A simple interface that lets you start uploading files in a few lines of code. Use our SDKs to integrate with your favorite Javascript framework.
01import { Restash } from "@restash/node";02import { createRestashUploader } from "@restash/client";0304// For server side usage05export const restash = new Restash(process.env.RESTASH_SECRET_KEY);0607// For client side usage08export const upload = createRestashUploader({09 publicKey: "pk_xxx",10 handleSignature: "/api/signature",11});
01import { Restash } from "@restash/node";02import { createRestashUploader } from "@restash/client";0304// For server side usage05export const restash = new Restash(process.env.RESTASH_SECRET_KEY);0607// For client side usage08export const upload = createRestashUploader({09 publicKey: "pk_xxx",10 handleSignature: "/api/signature",11});
01import { upload } from "@/lib/restash";0203const onSubmit = async (e: FormEvent<HTMLFormElement>) => {04 const formData = new FormData(e.currentTarget);05 const file = formData.get("file") as File;0607 const { url } = await upload(file, {08 onProgress: ({ percent }) => {09 console.log(percent);10 }11 });1213 console.log(url); // https://cdn.restash.io/xxx14};
01import { upload } from "@/lib/restash";0203const onSubmit = async (e: FormEvent<HTMLFormElement>) => {04 const formData = new FormData(e.currentTarget);05 const file = formData.get("file") as File;0607 const { url } = await upload(file, {08 onProgress: ({ percent }) => {09 console.log(percent);10 }11 });1213 console.log(url); // https://cdn.restash.io/xxx14};
Start uploading files with realtime progress tracking directly from the browser. No need to send your files to the server.
Upload, retrieve, and manage files in your storage using our Node.js SDK, streamlining file handling directly from your server.
01import { restash } from "@/lib/restash";0203export const POST = async (req: NextRequest) => {04 const formData = await req.formData();05 const file = formData.get("file") as File;0607 const result = await restash.files.upload(file);0809 // save to db or do something else with it10 await db.user.update({ avatar: result.url });1112 return NextResponse.json(result);13};
01import { restash } from "@/lib/restash";0203export const POST = async (req: NextRequest) => {04 const formData = await req.formData();05 const file = formData.get("file") as File;0607 const result = await restash.files.upload(file);0809 // save to db or do something else with it10 await db.user.update({ avatar: result.url });1112 return NextResponse.json(result);13};
Restash works out of the box with no configuration required. Just plug in your api key.
Serve your assets from CloudFront’s edge network for lightning-fast performance everywhere.
Upload any file from the browser with our simple and flexible client SDK for Javascript.
Upload, retrieve, and delete files from your server with our SDK for Node.js.
Restash was built with the goal to make object storage simple and easy to setup and use.
Upload and serve images, videos, fonts, documents, or any other static asset with ease.
Start with our free plan and upgrade as you grow
The perfect starting place.
Free forever.
5GB of included storage
Upload files up to 1GB in size
Unlimited uploads and downloads
Fast and secure CDN
Folder organization
Everything you need to build.
$20/month.
250GB of included storage
Upload files up to 5TB in size
Unlimited uploads and downloads
Fast and secure CDN
Folder organization
The storage layer that doesn’t slow you down.
Simple to integrate. Powerful when it counts.