Create a new thing where field type is "File"

I’ve been searching through the forum for a solution to create a text file but except not-answered threads, I didn’t find anything.

I tried to create a new thing that has a field of type “File” and set the value to “text”, but the field remained empty in the database.

The only “solution” I found is the one proposed by @keith there: [New Feature] File option on API Connector plugin
But I’m getting lost pretty quickly when talking about APIs and all that stuff.

How can it be so hard to generate a file???

Hey @julienallard1, what do you mean by text file? Do you want to upload a text file to host in the root directory of your app? You can do that in Settings > SEO > Very bottom of the screen.

If you’re trying to create a record in your database where one of its fields is a link to a file, then you’ll want to…

Create a new data type - give it a name. By default, Bubble gives you a built-in type called User to create user accounts. You can create other data types.

Create a field within the data type - give it a name like “Resume” (or something human-friendly). Set the field’s type to “file.” The default value in this setup screen doesn’t need to be filled here. This is just a default file that would be saved to every record of this data type if you create the record via workflow with no value for the file field. Optional.

Go to Data > App Data > New Entry to manually create a new record of the data type that contains your file field. Upload file to that field. Now, you’ll be able to see a bit more how the structure works. Notice that when you create a record, your field name is now a column header in the table for the data type.

You might be misunderstanding how data types, fields, and values work, but hopefully this helps.


Gaby at Coaching No Code Apps (formerly Coaching Bubble)

Courses & Products, Tutorials, Private Coaching, and High-level Development

Start Learning Today :mortar_board:

Hi @romanmg, thanks for taking the time to reply.

The thing is that in one of my workflow, I have a “Run javascript” action from the Toolbox plugin that generates a JSON object. Right now I’m saving the JSON to the DB in a text field.

Where I’m stuck is that I need to send that JSON in the form of a file (.json or .txt) to an external service. This service only accept files, so I can’t transmit the JSON string alone. So I need a way to generate a file on Bubble.

Ah I see … You may need to enlist the help of an API to generate the file for you, unfortunately. There aren’t any native actions in Bubble that create files outside of exporting your data to CSV.