File Manager

The File Manager tab in a Captive Portal zone is used to upload files that can then be utilized inside a captive portal page, such as style sheets, image files, PHP or JavaScript files.

The total size limit for all files in a zone is 1 MB.

File Name Conventions

When a file is uploaded using the File Manager, the file name will automatically be prefixed with captiveportal-. For example, if logo.png is uploaded it will become captiveportal-logo.png. If a file already has that prefix in its name, the name is not changed.

These files will be made available in the root directory of the captive portal server for this zone. The files may be referenced directly from the portal page HTML code using relative paths.

Example: An image with the name captiveportal-logo.jpg was uploaded using the file manager, It can then be included in the portal page as follows:

<img src="captiveportal-logo.jpg" />

PHP scripts may be uploaded as well, but they may need to be passed extra parameters to work as desired, for example:

<a href="/captiveportal-aup.php?zone=$PORTAL_ZONE$&redirurl=$PORTAL_REDIRURL$">
     Acceptable usage policy
</a>

Managing Files

To upload files:

  • Navigate to Services > Captive Portal

  • Edit the zone where the files will be uploaded

  • Click the File Manager tab

  • Click fa-plus

  • Click Browse

  • Locate and select the file to upload

  • Click fa-upload Upload

The file will be transferred to the firewall and stored in the configuration.

To delete files:

  • Navigate to Services > Captive Portal

  • Edit the zone where the file to delete is located

  • Click the File Manager tab

  • Click fa-trash-can next to the file to remove

  • Click OK to confirm the delete action

The file will be removed from the portal configuration and will no longer be available for use in portal pages.