Download a File from the Folder
Note: Catalyst now offers you a brand new object storage component called Stratus in Early Access mode. This component is a significant upgrade to the current Cloud Scale File Store component. You can find out more about the Stratus component here.
To use the Stratus component in the Early Access mode, email us at support@zohocatalyst.com.
To use the Stratus component in the Early Access mode, email us at support@zohocatalyst.com.
A file can be downloaded from the folder by referring to its unique FileID. A folder reference or a folder meta is used in the below code snippet. FileID is passed as an argument to the downloadFile() method.
The promise returned here will be resolved to a buffer containing the content of the file.
copy
//Download the file by passing the file ID to the method which in turn returns a promise
let filestore = app.filestore();
let folder = filestore.folder(1510000000109545);
let downloadPromise = folder.downloadFile(1510000000107568);
downloadPromise.then((fileObject) =>
{
console.log(fileObject);
});
Last Updated 2025-02-24 14:38:44 +0530 +0530
Yes
No
Send your feedback to us
Skip
Submit