-
Notifications
You must be signed in to change notification settings - Fork 251
Passing parameters to the FM
RichFilemanager accepts some parameters to be passed into the URL:
You can pass a javascript config file stored in /scripts/. Note that the config file can also be generated dynamically. It should just return a json object formatted as expected.
http://fm.devale.pro/index.html?config=user.config.json
You can specify the language by using langCode
.
http://fm.devale.pro/index.html?langCode=zh-cn
You can show only some type of files by passing the type into the URL with filter
parameter.
Available filters are listed in the filter
section of your "filemanager.config.json" file.
Feel free to customize the filters list and create your own filters in the configuration files.
http://fm.devale.pro/index.html?filter=image
You can open a given folder by passing it into the URL with expandedFolder
parameter.
http://fm.devale.pro/index.html?expandedFolder=/My_folder/
Can be combined with exclusiveFolder
parameter.
You can restrict the application to view a given folder by passing it into the URL with exclusiveFolder
parameter.
http://fm.devale.pro/index.html?exclusiveFolder=/My_folder/
Can be combined with expandedFolder
parameter.
IMPORTANT: exclusiveFolder
parameter restricts the view, but it can be changed easily by user just by changing parameter value in URL.
In other words this method is not safe to prevent users for browsing the default root folder. This is not a permission mechanism. It just applies on displaying files.
Please, do use the connector technique on how to setup dynamic user folder to prevent users to access unwanted/forbidden folders.