File in Catalyst File Store; Get file name

File in Catalyst File Store; Get file name

You can use the getFileDetails method available in the Node SDK in order to get the name of a file before downloading it. A sample code snippet for getting file name and other file details is as follows : 

  1.     let filestore = app.filestore();
  2.     let folder = filestore.folder(FOLDER_ID);
  3.     let detailsPromise = folder.getFileDetails(FILE_ID);
  4.     detailsPromise.then((fileDetails) => {
  5.         console.log(fileDetails);
  6.     });