The plugin offers flexibility when selecting files by allowing you to choose either a single file or multiple files, based on the configuration of the allow_multiple_selection field.
Set Allow Multiple Selection:
Set allow_multiple_selection to false
.
Define File Type:
Choose the desired file_type (e.g., images
, documents
) based on the file you wish to allow.
On File Selection:
When a file is selected, the onFilesSelected event will trigger.
Accessing File Details:
Use the exposed states (such as file_ids, file_urls, etc.) to access details like the file's ID and URL.
Event: onFilesSelected
Action: Save the file_id in the database or display the image in a gallery.
Set Allow Multiple Selection:
Set allow_multiple_selection to true
.
Define File Type and Limit:
Configure file_type and optionally set max_files to limit the number of selectable files.
On File Selection:
When multiple files are selected, the onFilesSelected event is triggered.
Accessing File Details:
Use the exposed states (e.g., file_ids, file_urls, etc.) to access the details of each selected file.
Event: onFilesSelected
Action:
Save multiple file_ids in the database.
Generate links for bulk downloads or display a list of selected files on the user interface.
Was this page helpful?
Thank you for your feedback!
Please Login First
Comments (00)