SDK API
Getting Started
utils/uploadworks.ts
const api: UploadWorksAPI = new UploadWorksAPI(process.env.API_KEY!, process.env.BUCKET!);
Functions
We are working on adding more functions for the SDK API. Feel free to contribute here (opens in a new tab)!
// Generate a PUT url with file name and time to live.
getSignedPUTURL(file: string, ttl?: number): Promise<string>;
// Generate a PUT url with file name amd other params for slug endpoints (webhook).
getSignedURLUpload(file: string, options: {
mimetype?: string;
slug?: string;
maxSize?: number;
metadata?: string;
}): Promise<string>;