How to get AWS S3 bucket URL when clicking on file

Hello, I am using the React and Amazon S3 Provider file manager.

Whenever I click on a file in the file manager, I would like to console.log() the S3 bucket file URL. How can I do that?

Thank you.


1 Reply

IL Indhumathy Loganathan Syncfusion Team October 3, 2022 03:21 PM UTC

Hi Rashnek,


Greetings from Syncfusion support.


We have validated your requirement in the File Manager component. You can get the complete path of a selected file within the File Manager component using the fileSelect event. Refer to the below code snippet.


fileSelection(args) {

  //Check whether the selected item is a file or not.

  if (args.fileDetails.isFile && args.action == 'select') {

    //Print the complete path of the file within the File Manager.

    console.log(args.fileDetails.filterPath + args.fileDetails.name);

  }

}


Sample: https://stackblitz.com/edit/react-elcumy-henyue?file=index.js


Please check the shared sample. If we misunderstood, do you want to get the Amazon bucket path at the File Manager client end? Please explain your exact requirements with more details. These details would help us assist you promptly.


Regards,

Indhumathy L


Loader.
Up arrow icon