SDK

Build with dosya.dev

Official SDKs for uploading, downloading, sharing, and managing files programmatically. Chunked uploads, resumable transfers, and webhook integrations out of the box.

Quick Start

Up and running in 30 seconds

JavaScript / TypeScript npm
$ npm install dosyadev

// Upload a file
import { DosyaClient } from 'dosyadev';

const client = new DosyaClient({ apiKey: 'dos_your_api_key' });

const result = await client.upload.file({
  workspaceId: 'ws_abc123',
  fileName: 'video.mp4',
  fileSize: buffer.byteLength,
  body: buffer,
  onProgress: (p) => console.log(p.percent + "%")
});

// List files
const { files } = await client.files.list({
  workspaceId: 'ws_abc123',
  sort: 'newest'
});

// Download
const stream = await client.download.stream('file_xxx');
Java Maven
// Maven: dev.dosya:dosya-java:0.2.0

import dev.dosya.sdk.DosyaClient;
import dev.dosya.sdk.model.*;

DosyaClient client = new DosyaClient("dos_your_api_key");

// Upload a file
UploadResult result = client.upload().file(
    UploadParams.fromFile("ws_abc123",
        new File("render-final.mp4"))
        .onProgress(p -> System.out.println(p.getPercent() + "%"))
);

// List files
ListFilesResponse files = client.files().list(
    new ListFilesParams("ws_abc123").sort("newest")
);

// Download
byte[] data = client.download().downloadBytes("file_xxx");
Features

What the SDK handles for you

Chunked Uploads

Large files are automatically split and uploaded in parallel.

Auto-Retry

Failed chunks are retried automatically with exponential backoff.

Progress Callbacks

Track upload/download progress with real-time percentage and speed.

Share Links

Generate password-protected, expiring share links programmatically.

Webhooks

Listen for upload complete, file deleted, and share link accessed events.

TypeScript Types

Full type definitions included. Autocomplete everything in your IDE.

Languages

Available SDKs

JavaScript / TypeScript

npm install dosyadev

Java

dev.dosya:dosya-java:0.2.0

Start building today

Get your API key and start integrating dosya.dev into your application in minutes.

Free tier includes 5 GB storage and full API access.