Skip to content

Passing parameters to the FM

pavel edited this page Dec 9, 2016 · 16 revisions

RichFilemanager accepts some parameters to be passed into the URL:

Passing a config file

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

Changing language

You can specify the language by using langCode.

http://fm.devale.pro/index.html?langCode=zh-cn

Restrict the view to images

You can show only images by passing type=images into the URL with.

http://fm.devale.pro/index.html?type=images

Opening a given folder

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.

Restrict the view to a given folder

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.