Developer docs1 min read
Files
Private uploads, attachments and signed links.
const upload = await yasad.files.createUpload({ name: 'job.jpg', contentType: 'image/jpeg', sizeBytes: bytes.length });
await fetch(upload.uploadUrl, { method: 'PUT', headers: { 'content-type': 'image/jpeg' }, body: bytes });
await yasad.files.finalize(upload.id);
await yasad.files.attach(upload.id, { target: { entity: 'record', id: job.id } });
const link = await yasad.files.download(upload.id);
- An upload session reserves quota for 10 minutes.
- Limits: 8 MiB per file and 64 MiB per workspace. Types: JPEG, PNG, PDF, UTF-8 text and JSON.
- Files are private. Download links are short-lived and grant access to that one file; keep them out of logs.
- An integrations key can publish a file (
POST /v1/files/{id}/visibility) or revoke public access.