Read File Content
client.files.get(stringfileID, FileGetParams { expires_at_seconds, organization_id, project_id } query?, RequestOptionsoptions?): PresignedURL { expires_at, url, form_fields }
GET/api/v1/beta/files/{file_id}/content
Returns a presigned url to read the file content.
Parameters
fileID: string
Returns
Read File Content
import LlamaCloud from '@llamaindex/llama-cloud';
const client = new LlamaCloud({
apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted
});
const presignedURL = await client.files.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');
console.log(presignedURL.expires_at);{
"expires_at": "2019-12-27T18:11:19.117Z",
"url": "https://example.com",
"form_fields": {
"foo": "string"
}
}Returns Examples
{
"expires_at": "2019-12-27T18:11:19.117Z",
"url": "https://example.com",
"form_fields": {
"foo": "string"
}
}