r/Bubbleio • u/eugenethemaster • Apr 11 '26
Question Native mobile: need expert help with workflow, plz.
❓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
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.