OpusCapita / filemanager

React based FileManager for browser ( + FS REST API for Node.js and Express)
https://demo.core.dev.opuscapita.com/filemanager/master/?currentComponentName=FileManager&maxContainerWidth=100%25&showSidebar=false
Apache License 2.0
566 stars 122 forks source link

Get file path #247

Closed EFXPROMedia closed 5 years ago

EFXPROMedia commented 5 years ago

Is there any control available to get the selected file path or preview?

It would be nice to be able to click on a file and assign buttons in the file row of the table, so we can assign custom actions to files e.g preview or get file path.

kvolkovich-sc commented 5 years ago

How to get file path.

See docs at this page. https://demo.core.dev.opuscapita.com/filemanager/master/?currentComponentName=FileNavigator&maxContainerWidth=100%25&showSidebar=false

You can get rowData using onResourceItemClick.

There is ancestors array in rowData where each item has name field.

You can concat it to get file path (relative to server-side fsRoot).