I want to split a file and upload it

In Bubble, I want to automatically split and upload large files, what do you think is the best solution?
I tried to write it directly in javascript but it didn’t work.

Have you tried this:
Convert to base64 string, split, upload, then concat

1 Like

Thanks for the reply!
I am currently trying but it is not working.
I am using a plugin called “File URL to Base64” to save the base64 to the database and then cut it out.
If you have any other good solutions or helpful URLs, I would appreciate it if you could let me know.

Oh that sounds like the plugin I built :slight_smile:

That may not be super useful because it assumes that the file is already uploaded and has a url.
You’re probably better off using some custom JS to load the file on the client side, convert it to base64 there and then save chunks of this string to your database (or wherever you’re uploading it).

Doesn’t sound like a very trivial thing to do though.

I’m wondering why you want to split it like this - Bubble supports large uploads. So why not allow standard uploads of large files?

Thanks for the reply!
I see you were working on something similar, so I should have used your plugin first!
I want to send audio files over 50mb to the API provider with “API connector.” I’m having a problem with my provider and they only accept audio files, so I’d like to split the file and send it somehow.

Oh so you can’t send the URL of the file instead?
That would be ideal.

The Bubble API connector restricts the payload to 50mb. Even if you do convert it to base64 it would still have the same size.

Some folks have worked around this by uploading the file to a private S3 bucket, exposing an AWS API endpoint to Bubble which then further sends the corresponding file to the final API that you’re trying to call.

I know, right?
I can’t…

Thanks for sharing a good way to do it!

“Some folks have worked around this by uploading the file to a private S3 bucket, exposing an AWS API endpoint to the Bubble which then further sends the corresponding file to the final API that you’re trying to call.”
Does this mean that you are circumventing this by creating a bucket in S3 and exposing the API for the endpoint of the blue?
If I do it that way, I’ll end up sending the url, and I don’t think I can send it, is that possible?

1 Like

No, I mean you make the API call from a separate AWS instance connected to an S3 bucket containing the file - which you control from Bubble.

So you can let the AWS instance make the call without the restrictions that Bubble imposes.

1 Like

Thanks for answering so many questions!

Now that I have a clear direction, l’ll give it a try!

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.