Skip to content

Commit 918a86a

Browse files
committed
update local upload intro
1 parent 0e5ce20 commit 918a86a

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

docs/ff-concepts/file-handling/uploading-files.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,15 @@ You can upload media to a **Supabase bucket** at a specified location. After the
3131

3232
### Local Upload (Widget State)
3333

34-
This method saves your media to the device first. You can access it via **Widget State > Uploaded Local File**. Then, make an API call to transfer the file to your server. **Ensure** that this API call returns the URL of the uploaded file, which you can later use to preview the media.
34+
This method initially stores your media on the device, making it accessible via **Widget State > Uploaded Local File**. From there, you can do various things with the local file:
35+
36+
- **Preview or Validate the Media**: Show the user an in-app preview before deciding whether to finalize or discard the upload.
37+
- **Editing Before Submission**: Modify the file (e.g., apply filters to an image) before saving it to permanent storage.
38+
- **Perform Data Operations**: Access the file bytes (e.g., for compression, transformations, or further processing).
39+
- **Offline Functionality**: Store the media locally and defer uploading until the user regains internet access.
40+
- **Upload to Server**: When you want to store the file externally, you can then make an API call (e.g., multipart form data) to transfer the local file. Be sure to retrieve and save the resulting file URL if you plan to display it later.
41+
42+
By handling the media locally first, you gain flexibility—such as letting users confirm or edit an image—before making any final decisions on where to store or how to process it.
3543

3644
![upload-type-local-and-api.avif](imgs/upload-type-local-and-api.avif)
3745

0 commit comments

Comments
 (0)