Services Plugins FAQs

AWS File Uploader: "Warm Start" Best Practices?

I’m building file upload into my app with the AWS File Uploader and am generally successful across the board, especially after some helpful guidance here on the forum. The documentation notes that the first call to the plugin will typically be a little slow due to the way Bubble instantiates server-side actions. I do see this in practice; the first photo upload is markedly slower than subsequent uploads. I want to make use of the “warm start” functionality that is outlined in the Tips section of the documentation but cannot get it to work. As far as I can tell, this should go:

  1. On page load, fire the ‘Generate Pre-Signed URL’ workflow action. Provide a static file and a valid bucket name.

  2. This should load the Bubble server-side modules. By the time your user is actually uploading files, the temp modules are installed and ready.

I am looking for some insight on the best practices for where to store this static, “dummy,” file. I haven’t yet succeeded in setting this warm start functionality up, and get ‘Invalid keypath / unexpected token’ in my browser console. I’m trying to pass in a file dynamically that is stored on a record.

Thank you for any suggestions!

Hi @pmundell,

Thanks for your detailed message! To help you best with the “warm start” setup, could you please share:

  • A screenshot or video of your workflow configuration where you call the ‘Generate Pre-Signed URL’ action.
  • How and where you’re storing the static “dummy” file you’re trying to pass dynamically.
  • Any exact error messages or logs from the browser console.

This info will help us troubleshoot the “Invalid keypath/unexpected token” error and provide precise guidance.

Meanwhile, here are some general suggestions for a “warm start”:

  1. Warm Start Setup: On page load, trigger the “Generate Pre-Signed URL” action with a static file (e.g., dummy.txt) and a valid bucket name (e.g., my-bucket).
  2. Fixing the Error:
  • Ensure the static file exists and is accessible.
  • Verify the bucket name matches your AWS S3 settings.
  • Use a simple keypath (e.g., warmstart/dummy.txt) with no invalid characters.
  1. Test and Monitor: Check the browser console for errors and confirm the workflow runs without issues.

In addition - double-check your AWS credentials and permissions in the plugin settings.

Looking forward to your reply!

Best regards,
Support Team
Browse all Zeroqode Plugins for bubble
Banner_Last3

hey Constantin, thank you for your reply - I think I resolved my issue. You noted the importance of a simple path without invalid characters and I think that was my problem, I was passing a file URL from bubble File Manager with a series of uneccessary URL params following the actual path. I shortened to just the ‘…cdn.bubble.io/…/filename.jpg’ and I see speedup on first real upload now. For posterity, our implementation is

  1. a ‘Page is Loaded’ event on the page with a single action element, calling a Backend Workflow, passing text arguments for ‘bucketname’ and ‘filepath;’
  2. the Backend Workflow is also a single action element, ‘Generating a Pre-Signed URL,’ accepting those two text arguments. Filepath points to a static image file in our Bubble File Manager and I’ve truncated it to end before the ‘?’ to cut all the params off.

Thank you for your help! Paul

1 Like

As an additional question, is there any timeout period after which you should consider running the Warm Start again? If the page loads and the Warm Start is fired, and then the user doesn’t upload for several minutes, do the temporarily-installed Bubble modules expire?

Hi @pmundell ,

Thank you for your question!

While the documentation doesn’t specify an exact timeout period, Bubble’s server-side modules typically stay active for 5 to 15 minutes during an active session. If no activity occurs, they may expire, requiring another Warm Start.

To ensure optimal performance:

  • If you expect users might delay uploads for more than a few minutes, you could set up a recurring workflow (e.g., every 5 minutes) to re-trigger the “Generate Pre-Signed URL” action, keeping the modules active.
  • Alternatively, trigger the Warm Start again right before the user initiates an upload, if your app’s design allows for it.

Let me know if you need further assistance!

Best regards,
Support Team
Browse all Zeroqode Plugins for bubble
Banner_Last3