Forum Academy Marketplace Showcase Pricing Features

Import .bc3 document, reusing existing code we have for SQL

Hi there :wink:

We need to import .bc3 document to bubble database.

Currently we use JS code (client side) to pass data from .BC3 document to SQL (on another website)
Is it possible to reuse that code and how on ?


I know you can use plugin code to run javascript and upload documents to bubble. It may have to be slightly refactored but the plugins have a built in function for passing files to the database. it goes like
context.uploadContent: function(fileName: String, contents: Base64 String, callback: function(err, url), [attachTo]) attachTo: optional parameter to attach the file to. It has to be a thing in Bubble
The attachTo is just for document privacy for instance if only a certain customer should be linked to it then you would link their unique id and only users with access to that customer could then view the file.
I am not familiar with .bc3 document but I used plugin code for uploading pdfs from Base64 String to bubble databse as a url. Bubble saves the file on a Amazon s3 server I believe.

Thanks william, But we donโ€™t want tosave the file as an attachment. Our current JS code allow us to save the data in .bc3 file into thing in our data base. Do you think that will be possible with bubble?

I know bubble can save a field which has a type of โ€˜fileโ€™ but to be honest I am not sure if it is what you are looking for.