liara_get_object_download_url
Generate a temporary download URL for objects stored in Liara cloud storage buckets to enable secure file access and sharing.
Instructions
Get download URL for an object
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bucketName | Yes | The name of the bucket | |
| objectKey | Yes | The object key | |
| expiresIn | No | URL expiration time in seconds (optional) |
Implementation Reference
- src/services/storage.ts:128-144 (handler)Core handler function that generates a temporary download URL for a specific object in a Liara object storage bucket. Calls the Liara API endpoint to retrieve the presigned URL, with optional expiration time.export async function getObjectDownloadUrl( client: LiaraClient, bucketName: string, objectKey: string, expiresIn?: number ): Promise<{ url: string; expiresAt?: string }> { validateRequired(bucketName, 'Bucket name'); validateRequired(objectKey, 'Object key'); const params: any = {}; if (expiresIn) params.expiresIn = expiresIn; return await client.get<{ url: string; expiresAt?: string }>( `/v1/buckets/${bucketName}/objects/${encodeURIComponent(objectKey)}/download`, params ); }