Delete a File
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 2023-09-03 01:06:41 +0530 +0530
Yes
No
Send your feedback to us
Skip
Submit