getActualFileFromTempUrl (Custom Action)

This custom action is essential for converting each fileInfo item (from the file uploader) into a real, byte-based file object (ffUploadedFile) that can be uploaded to your storage system (e.g., Supabase, Firebase Storage, S3, or via API).


πŸ“Œ Basic Usage Scenario

To upload the files to your storage, follow this pattern:

  1. Insert a Loop Action in a button Use a loop to iterate through the list of uploaded files, which is stored in your AppState

    • Loop Source: App State > Powerful File uploader with dropzone > receivedFilesInfo .

  2. Call getActualFileFromTempUrl inside the loop

    • Input: Use currentItem from the loop (a single fileInfo object).

    • Important: Set a name for the Action Output so it can be accessed in the next step.

  3. Upload to storage

    • Choose your upload method: Supabase, Firebase, or a custom API call.

    • In the "File to Upload" field, select:

      Action Output β†’ [your output name from step 2]

      This is the actual ffUploadedFile created from the file's tempUrl.

  4. Post-upload logic (optional):

    • Clear the uploaded file from the list (if you want to show a live upload progress).

    • Navigate to another page.

    • Show a success message.

    • Clear the entire list from AppState once all uploads are done.


βœ… Why this matters

You might wonder: β€œWhy not just get the real file (as bytes) directly from the uploader and skip this custom action?” Great question β€” and the answer is even better.

If you tried to store even just two medium-sized files (e.g., 2–4 MB each) as actual ffUploadedFile byte objects inside a list stored in page state, your app’s UI would likely lag or even crash β€” especially in web environments. Web browsers aren’t built to keep large binary data in memory for long periods.

That’s what makes this uploader so powerful: It keeps your interface fast and responsive by not loading the actual files into memory right away. Instead, it stores lightweight references (tempUrl) and only converts each file into a real, uploadable format at the exact moment it’s needed, one by one.

This ensures that even large files can be processed and uploaded without overloading the user’s browser or device β€” providing a smooth, scalable experience regardless of file size.

Last updated