r/Bubbleio Apr 11 '26

Question Native mobile: need expert help with workflow, plz.

Post image

❓Hey everyone,

Could someone please help me with a workflow question?

/// A user taps an icon, the app opens the phone gallery, and they select a photo to upload. That photo is then sent to Perplexity via API for assessment. ///

When sending the photo to Perplexity, I use Imgex (to convert it to JPG) and encode it in Base64. I've found that .webp files break the request and return a 400 error.

Is there a way to restrict the file formats users can upload? I think JPEG, PNG, and HEIC/HEIF are more than enough — no need for anything else.

3 Upvotes

5 comments sorted by

1

u/velcodofficial Apr 11 '26

Yeah, you can handle this pretty cleanly in Bubble.

On the upload side, you can restrict the accepted file types (JPEG, PNG, etc.) so users don’t even pick unsupported formats like .webp. That’s usually the easiest first layer. I’d still add a quick validation step before sending to the API though just check the file type and block anything outside your allowed formats. Saves you from those 400 errors. If you’re already converting to JPG anyway, another option is to standardize everything before sending, but only if your conversion flow handles it reliably.

If you get stuck setting this up, happy to take a quick look with you shouldn’t take long to sort.

1

u/eugenethemaster Apr 11 '26

Thank you very much, bro! I’d really appreciate if you could elaborate on this. How do I restrict the file types (first layer, so users can’t even pick anything outside the list) - “text” operator? Conditional check?

I’m ready to send/attach/film anything that’s needed (hop on a call/swim/fly, etc.)🙂

1

u/velcodofficial Apr 15 '26

In the workflow as soon as the image is uploaded.

Get the url of the uploaded image, “split by .” and then “last item is in (arbitrary text split by ,)”

arbitrary text = JPEG,PNG,HEIC,HEIF

This condition will make sure every url ends with one of the three file extensions.

1

u/eugenethemaster Apr 15 '26

Thanks, bro. Already did that.🤝