Delete a File

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.

A file from a folder can be deleted by referring its File ID. The folder reference or a folder meta is used in the below code snippet. A fileID is passed as a parameter to the deleteFile() method.

The promise returned here will be resolved to an deleted file object which is a JSON.

    
copy
// Delete 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 deletePromise = folder.deleteFile(1510000000107568); deletePromise.then((fileObject) => { console.log(fileObject); });

Last Updated 2025-02-24 14:38:44 +0530 +0530

ON THIS PAGE
ACCESS THIS PAGE