Join the Webstudio community

Updated last month

How do I form post to bucket & db

At a glance

The community member is trying to build a simple blog with an image header and text, and wants to submit form data to both a database and a storage bucket (potentially an S3 bucket) in a single action. They have built the forms and linked them, but need to pass the headers. The community members discuss using a backend that supports file upload and sending form data to the database, with suggestions of using Supabase or Appwrite. There is some confusion around how to integrate the database and storage, and the community members suggest exploring Appwrite functions or Supabase to achieve the desired functionality. The community members also mention Replit as a potentially easier option, but the original poster wants to learn the backend development process themselves.

Useful resources
I believe I need this issue to be resolved before I can actually do what I want. https://github.com/webstudio-is/webstudio/pull/4333 I've built my forms and linked them, just need to pass the headers.

While I wait for that completion, I'm trying to figure out how it will work. Outside of Webstudio, I can post data to the database and the bucket that I want, but those are two separate actions. I want a form that can submit to the DB and to the bucket in one go. This is for a super simplistic blog with an image header and text.
O
J
12 comments
with bucket you mean s3 bucket?
It sounds like you will want a backend that supports file upload and sends the form data to the db
potentially supabase can do both
I'm using appwrite, but I assume it's the same concept.
I think it doesn't provide the actual database hosting, but yeah, you can for sure get there with it
I'm confused with the statement about "file upload and sends the form data to the db". Are you saying that sending data to the buckets will then write into the database?

With appwrite there are databases and storage, but I don't think there is a way to have one post to the other.

(Because of Webstudio, I've been trying to learn this backend stuff, I have almost no experience with it before so I'm at the beginning of this learning curve).
Maybe I can figure out appwrite functions to achieve what you mean?
no form data in the sense of other fields not file upload - you need to write into the db, file reference from the bucket too, file itself - to the bucket
generally a backend should take care of doing this logic, deciding what goes where
I just asked gpt how to do it with supabase to see if that gives me good results and yes, seems like it does, prob same is possible with appwrite
I wonder if replit would be even easier for you
I've copy/paste your answers into AI already. It sounds like I can do this... I'm just going through the steps to figure it out.

I never heard of replit before, but I do have a windsurf license. Part of this is the learning experience for me, I don't want to rely entirely on AI to build backend stuff.
Add a reply
Sign up and join the conversation on Discord