Xanomorph

Share this post

Sending a CSV to Xano using the Bubble API connector when the uploaded file is private

www.xanomorph.com

Discover more from Xanomorph

Tips and tricks when building a no-code back-end using Xano.
Continue reading
Sign in

Sending a CSV to Xano using the Bubble API connector when the uploaded file is private

You need to use a Bubble API key.

Walter Haydock
Jan 3, 2023
Share this post

Sending a CSV to Xano using the Bubble API connector when the uploaded file is private

www.xanomorph.com
1
Share
silver skeleton key on black surface

After resolving the back-end problems associated with parsing a CSV on the Xano side, I turned to the front-end. Although I could now get Xano to process CSVs, I was having problems sending them from Bubble.

After encoding the file as base64 and having it sent via API to Xano, it would decode into weird text:

{"error_class":"Unauthorized","args":{"code":"1670957944426x137539456986082160"},"message":null,"translation":"Permission denied"}

After much troubleshooting, reviewing Xano and Bubble blogs, and going to Xano office hours, I figured out what the problem was.

The error I got was the result of me marking the file as “private” in Bubble. Having the data be publicly available was not an option for me, so I needed a way to protect it.

Bubble, however, does not let you send private files through the API connecter. Fortunately, I found a crazy workaround that still allows you to keep the file private. Check out this post for the original, but see below for more details and explicit steps.

1) Enable the Bubble API for workflows and generate a Bubble API token.

2) Combine the file’s URL (the location where it is stored after using the Bubble FileUploader) with a Bubble API token to give the Bubble API connector access to the underlying data and send it to Xano.

Get 10% off Xano!

3) For good measure, delete the file at the end of the process to prevent your storage from being overloaded and also set the encoded value to 0. There is no reason to retain any data in the front end that you don’t need, so deleting it removes a potential security risk.

Thanks for reading Xanomorph! Subscribe for free to receive new posts.

Share this post

Sending a CSV to Xano using the Bubble API connector when the uploaded file is private

www.xanomorph.com
1
Share
1 Comment
Share this discussion

Sending a CSV to Xano using the Bubble API connector when the uploaded file is private

www.xanomorph.com
Dqtdotk
Jan 3Liked by Walter Haydock

Amazing!

Expand full comment
Reply
Share
Top
New
Community

No posts

Ready for more?

© 2023 Walter Haydock
Privacy ∙ Terms ∙ Collection notice
Start WritingGet the app
Substack is the home for great writing