Skip to content

Getting Started with Cloud

Sign up at app.uploadista.com and create your first organization.

In the dashboard, go to Storages and create a new storage. This is where your uploaded files will be stored. Note your Storage ID — you’ll need it for the client configuration.

Go to Settings > API Keys and create an API key. You’ll need this on your backend to exchange credentials with Uploadista Cloud.

UPLOADISTA_API_KEY=upl_sk_...

Your backend needs a single endpoint that exchanges your API key for a short-lived JWT token. This is the bridge between your auth system and Uploadista Cloud.

app/api/auth/token/[clientId]/route.ts
import { getAuthCredentials } from '@uploadista/server/auth';
export const GET = async (req: Request, ctx: { params: Promise<{ clientId: string }> }) => {
const { clientId } = await ctx.params;
// Optional: verify the user is authenticated with YOUR auth system
// const session = await getSession(req);
// if (!session) return new Response("Unauthorized", { status: 401 });
const response = await getAuthCredentials({
uploadistaClientId: clientId,
uploadistaApiKey: process.env.UPLOADISTA_API_KEY!,
});
if (!response.isValid) {
return Response.json({ error: response.error }, { status: 500 });
}
return Response.json(response.data);
};

Install the auth helper:

npm install @uploadista/server

Install the client SDK for your framework and configure it in uploadista-cloud mode:

import { UploadistaProvider } from "@uploadista/react";
function App() {
return (
<UploadistaProvider
storageId="your-storage-id"
auth={{
mode: 'uploadista-cloud',
authServerUrl: '/api/auth/token',
clientId: process.env.NEXT_PUBLIC_UPLOADISTA_CLIENT_ID!
}}
>
{/* Your app */}
</UploadistaProvider>
);
}

That’s it — you’re ready to upload files through Uploadista Cloud:

import { Upload } from "@uploadista/react";
function FileUploader() {
return (
<Upload onSuccess={(result) => console.log("Uploaded:", result)}>
<Upload.DropZone accept="image/*">
{({ isDragging, getRootProps, getInputProps }) => (
<div {...getRootProps()}>
<input {...getInputProps()} />
{isDragging ? "Drop your file here" : "Click or drag to upload"}
</div>
)}
</Upload.DropZone>
<Upload.Progress>
{({ progress, isUploading }) =>
isUploading && <progress value={progress} max={100} />
}
</Upload.Progress>
<Upload.Error>
{({ hasError, failedItems, reset }) =>
hasError && (
<div>
<p>Upload failed: {failedItems[0]?.state.error?.message}</p>
<button onClick={reset}>Dismiss</button>
</div>
)
}
</Upload.Error>
</Upload>
);
}

To process files after upload, create a flow in the dashboard:

  1. Go to Flows in the dashboard
  2. Click Create Flow
  3. Build your processing pipeline with the visual editor
  4. Save and activate the flow
  5. Use it from the client:
import { Flow } from "@uploadista/react";
function ImageUploader() {
return (
<Flow
flowId="your-flow-id"
storageId="your-storage-id"
onSuccess={(outputs) => console.log("Processed:", outputs)}
>
<Flow.DropZone accept="image/*">
{({ isDragging, getRootProps, getInputProps }) => (
<div {...getRootProps()}>
<input {...getInputProps()} />
{isDragging ? "Drop your image here" : "Click or drag to upload"}
</div>
)}
</Flow.DropZone>
<Flow.Status>
{({ status, currentNodeName }) => (
<p>{status === "processing" ? `Processing: ${currentNodeName}` : status}</p>
)}
</Flow.Status>
<Flow.Error>
{({ hasError, message, reset }) =>
hasError && (
<div>
<p>Error: {message}</p>
<button onClick={reset}>Try again</button>
</div>
)
}
</Flow.Error>
</Flow>
);
}