Days
Hours
Minutes
Seconds
x

New Froala Editor v5.0.0 is here โ€“ Learn More

Skip to content
Froala Documentation

Files Manager

Plugins are fully functional during your trial once you've added your trial key to the setup.

File manager plugin allows users to upload any type of file not just images through an uploading button, drag-and-drop, URL, or embedding code. You can use it to upload single or multiple files simultaneously. It enables users also to insert, view, and delete the uploaded files.


Plugin options:

filesManagerAllowedTypes
Array - Default: ['*']
The list of file types that are allowed to be uploaded. Although this will restrict uploading other types of files, we strongly recommend you to check the file type on the server too.
filesManagerMaxSize
Number - Default: 1024 * 1024 * 10
The maximum file size allowed on upload in bytes. The default value is 10MB. Although this makes an additional check before uploading the file, it is highly recommended to check file size on your server too.
filesManagerUploadParams
Object - Default: {}
Pass additional parameters to the file upload request.
filesManagerUploadToS3
Object - Default: false
Set the options for file upload to S3. All the fields from the example below are required. Also make sure that you have enabled CORS on Amazon.
filesManagerUploadURL
String - Default:'http://i.awsstage.froala.com/upload'
The URL where the files uploaded by the user are saved. When a file is uploaded, the editor sends the file to the server through a HTTP request. The server should process the data from the file parameter of the request and return a JSON object containing a link field with the link to the uploaded file.

Plugin events:

filesManager.beforeUpload (files)
Triggered before uploading a file to the server.

โ— files: An array with the files to be uploaded.
filesManager.error (error, response)
Triggered before uploading a file to the server.
Note: Returning false in the handler assigned to the event will cancel the current action.
โ— error An object containing error code and description.
โ— response Response object received from server.
filesManager.uploaded (response)
Triggered after the file was uploaded.
Note: Returning false in the handler assigned to the event will cancel the current action.
โ— response The original server response.
filesManager.uploadedToS3 (link, key, response)
Triggered after the file was uploaded to S3.
Note: Returning false in the handler assigned to the event will cancel the current action.
โ— link The link to the uploaded file.
โ— key The key of the uploaded file.
โ— response The original server response.

Add Plugin to your code:

Plugin name: filesManager

Plugin JS Script: ../js/plugins/files_manager.min.js

Or from CDN https://cdn.jsdelivr.net/npm/froala-editor@latest/js/plugins/files_manager.min.js

Example:

Files Manager

Ready to dive in? Explore our plans

Sign up

Download the code by signing up for our newsletter

Sign up

Download the code by signing up for our newsletter

Note: By registering, you confirm that you agree to the processing of your personal data by Froala, Inc. - Froala as described in the Privacy Statement. Froala, Inc. - Froala is part of the Idera group and may share your information with its parent company Idera, Inc., and its affiliates. For further details on how your data is used, stored, and shared, please review our Privacy Statement.