|
| 1 | +--- |
| 2 | +title: Download File |
| 3 | +slug: /concepts/file-handling/download-file |
| 4 | +sidebar_position: 6 |
| 5 | +tags: [Media, Download Data, File Management] |
| 6 | +keywords: [Media, Download Data, Firebase Storage, Supabase Storage] |
| 7 | +description: Learn how to add download file action into your FlutterFlow app. |
| 8 | +--- |
| 9 | + |
| 10 | +# Download File |
| 11 | + |
| 12 | +The **Download File** action allows you to enable users to download or save files locally on their devices. |
| 13 | + |
| 14 | +<div style={{ |
| 15 | + position: 'relative', |
| 16 | + paddingBottom: 'calc(56.67989417989418% + 41px)', // Keeps the aspect ratio and additional padding |
| 17 | + height: 0, |
| 18 | + width: '100%'}}> |
| 19 | + <iframe |
| 20 | + src="https://demo.arcade.software/dhlZ7J8kDFNDypyv5TcO?embed&show_copy_link=true" |
| 21 | + title="" |
| 22 | + style={{ |
| 23 | + position: 'absolute', |
| 24 | + top: 0, |
| 25 | + left: 0, |
| 26 | + width: '100%', |
| 27 | + height: '100%', |
| 28 | + colorScheme: 'light' |
| 29 | + }} |
| 30 | + frameborder="0" |
| 31 | + loading="lazy" |
| 32 | + webkitAllowFullScreen |
| 33 | + mozAllowFullScreen |
| 34 | + allowFullScreen |
| 35 | + allow="clipboard-write"> |
| 36 | + </iframe> |
| 37 | +</div> |
| 38 | +<p></p> |
| 39 | + |
| 40 | +:::tip[File Download Location] |
| 41 | +- **Windows, macOS, Linux, and Web**: Files are saved in the **Downloads** folder by default. |
| 42 | +- **iOS**: Files are downloaded in the **Application Documents Directory**. |
| 43 | +- **Android**: Files are saved in the application's directory at `Android/data/your.package.name/files/your_file.extension`. |
| 44 | + |
| 45 | +::: |
| 46 | + |
| 47 | +## Add Download File [Action] |
| 48 | + |
| 49 | +To add a download file action, select the **Widget** (e.g., button or any interactive widget) where you want users to initiate the file download and set the **Source** to one of the following. |
| 50 | + |
| 51 | +- **From URL**: Use this option for downloading files that are accessible through a direct link and specify the URL of the file that should be downloaded. |
| 52 | +- **From File (Bytes)**: Use this option when the file is uploaded to the device using the [Local Upload (Widget State)](upload-data.md#local-upload-widget-state). You can access the file via ***Widget State > Uploaded Local File***. |
| 53 | + |
| 54 | +Optionally, you can specify a **Filename** to be used when the file is downloaded. |
| 55 | + |
| 56 | + |
0 commit comments