File Upload Supabase + T3 Stack
Hey how would I go about uploading a file with the t3 stack and supabase with a form so basicly I have a form with questions like:
server name?
description?
and then I have a image upload field I dont know how I would upload the image and get the url and store in the database can anyone please help me thanks!!
10 Replies
you first need to choose a host to store your file, theo just launched a service you can try that out.
basically you only store url in your database, you upload the file to somewhere else. And the code is very different depending on what platform you choose.
if you choose supebase they have tutorials on their website and here: https://www.youtube.com/watch?v=JLaq0x9GbbY
Florin Pop
YouTube
New Supabase Storage Feature?! 🤩 ReactJS + Uppy Demo Project
Supabase is my go-to when it comes to dealing with Auth, storage, and database in a ReactJS / NextJS app! It's so easy to get it up and running!
In this video, I'm showing you how to add use Supabase's new resumable uploads with Uppy to a React App and make it super simple to allow users to pause and resume their uploads!
👉 Learn more about St...
Yeah I want to use supabase
But how would I go about sending the image with the data?
below is how I implemented it and it works fine user inputs the file name and both the file and file name are stored in the database but i am using Nextjs13.3.1 and supabase no other things around
Is it t3 stack?
i am not using t3 stack but I am using supabase and Nextjs 13 but that is how it should be implemented when using nextjs and typescript
Ok I’ll take a look at it when I get home
okay
alr thanks!
dude I linked the video tutorial for you
that was different
not the solution I was looking for