Overview
The File Downloader is a custom Bubble action that allows your app to securely download files from remote URLs. It provides a smooth download experience with progress tracking, error handling, and efficient file management.
What It Does
- Securely downloads files from HTTP/HTTPS URLs
- Shows a visual progress indicator during downloads
- Handles large files efficiently
- Includes automatic retries for failed downloads
- Validates URLs for security
- Allows customization of filenames
Fields
Required Fields
- fileurl
- Description: The URL of the file you want to download
- Format: Must be a valid HTTP or HTTPS URL
- Example: https://example.com/files/document.pdf
- filename
- Description: The name you want to give the downloaded file
- Format: Text without invalid characters (/\:*?"<>|)
- Example: my-report
- Note: File extension will be added automatically if not included
How to Use
Setup
- Add the File Downloader action to your Bubble app
- In your workflow, add a "Run JavaScript" action
- Select the File Downloader action from the dropdown
Creating a Download Button
- Add a button to your page
- Create a workflow that triggers when the button is clicked
- Add a "Run JavaScript" action with the File Downloader
- Configure the fileurl and filename parameters
Dynamic Values
You can use dynamic data for both fields:
- Connect fileurl to a data field containing a URL
- Connect filename to a user input or data field for custom naming
Example Use Cases
- Allow users to download PDF reports
- Enable document downloads in a file management system
- Provide downloads for generated content
- Add download capabilities to media files
Technical Details
- Maximum file size: 100MB
- Download timeout: 60 seconds
- Maximum retry attempts: 2
- Supported file types: All common file types including images, documents, audio, video, and archives
Troubleshooting
- If downloads fail, check that the URL is accessible and properly formatted
- Ensure file sizes are under 100MB
- For files without extensions, the action will attempt to determine the correct extension from the content type
This action enhances your Bubble app with professional download capabilities while maintaining a smooth user experience through clear visual feedback.
Comments (00)