Path Parameters
Query Parameters
Required range:
60 <= x <= 3600import Spitch from 'spitch';
const client = new Spitch();
const response = await client.files.download('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');
console.log(response.file_id);{
"file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}Generate a pre-signed download URL for a file.
Args: file_id: UUID of the file to download identity: Authentication identity containing org_id ttl: Time-to-live for the download URL in seconds (60-3600) db: Database session s3: S3 session for generating pre-signed URLs
Returns: FileDownloadResponse: Contains file_id, download URL, and expiration time
Raises: HTTPException: 404 if file not found, doesn’t belong to org, or not ready
import Spitch from 'spitch';
const client = new Spitch();
const response = await client.files.download('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');
console.log(response.file_id);{
"file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}60 <= x <= 3600Was this page helpful?