Skip to content

Commit c28eca7

Browse files
authored
Merge pull request #203 from FlutterFlow/pinkesh/file-download-action
Added File Download [Action]
2 parents c2a7bf6 + 8f48945 commit c28eca7

File tree

3 files changed

+57
-1
lines changed

3 files changed

+57
-1
lines changed

docs/ff-concepts/file-handling/clear-delete-media.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Clear or Delete Media
33
slug: /concepts/file-handling/clear-delete-media
4-
sidebar_position: 6
4+
sidebar_position: 7
55
tags: [Media, Action]
66
keywords: [Media, Clear Data, Delete Data Firebase Storage, Supabase Storage]
77
---
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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+
![file-download-action](imgs/file-download-action.avif)
Binary file not shown.

0 commit comments

Comments
 (0)