refine x supabase: file upload issue
Hi, I'm trying to add a video upload section in my project, but I keep getting the error in the attached image whenever I try to save a record after successfully uploading the video. Mind you, I'm following the tutorial in the documentation : https://refine.dev/docs/packages/documentation/data-providers/supabase/#adding-an-edit-page. But I can't seem to get it to work.
Supabase | refine
Introduction
![No description](https://cdn.answeroverflow.com/1110606947075510394/image.png)
13 Replies
Hi @david4473. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Hmm, I don't know enough to give you a confident answer yet. However, I can provide you with some information from the documentation that might help you with your issue.
In the refine Supabase documentation (https://refine.dev/docs/packages/documentation/data-providers/supabase), there's an example of adding an Edit page with a file upload section. The example uses an image upload, but you can adapt it for video uploads. Make sure you've followed the steps correctly, especially the part related to the
normalizeFile
function in the src/utility/normalize.ts
file.
If you're still having issues, I recommend checking the refine documentation (https://refine.dev/docs) and refine blog (https://refine.dev/blog) for more information and examples.
----------------------
Note: you can ask me a follow up question by @ mentioning me again
:speech_balloon:
----------------------Overview | refine
What is refine?
Blog | refine
A Docusaurus powered blog!
<@613966567239057412> kapa.ai is still learning and improving, please let us how it did by reacting below
rival-black•16mo ago
The problem isn't from the the normalize file. I used the exact code from the example in the documentation.
At first I thought I needed to set up supabase on my own, but then I noticed that my application uses the same supabase URL and KEY as the example on the documentation site. So why is it that I can't upload files on my project?
@Omer I know you're busy, but I really need your help on this. Thanks in advance.
foreign-sapphire•16mo ago
Hey @david4473 The sample application here is working. You can check what's different with your project.
https://refine.dev/docs/examples/data-provider/supabase/
Supabase | refine
Connect your Supabase database with refine Supabase Data Provider and easily manage all the features that the database offers in your interface. This example will show you how Supabase Data Provider works and is used.
rival-black•16mo ago
I have, there isn't any difference. I also tried fiddling with the example's Codesandbox, by adding a video upload, I got the same error.
rival-black•16mo ago
Here's a link to my repo btw: https://github.com/david4473/refine-x-supabase
GitHub
GitHub - david4473/refine-x-supabase: a refine application with sup...
a refine application with supabase backend. Contribute to david4473/refine-x-supabase development by creating an account on GitHub.
foreign-sapphire•16mo ago
refine supabase example
Web site created using refine
foreign-sapphire•16mo ago
I have uploaded an image here.
unwilling-turquoise•16mo ago
Hello @david4473 It says this column isn't defined, did you add
videos
column to your data provider?rival-black•16mo ago
Do you mean on supabase?
I haven't set up supabase myself, I'm using the one that came with the project, same as in the example on the documentation.
Forgive my initial naivety, I have a good understanding of where the issue is coming from. I couldn't add a video upload cause there isn't a "video" column on the "blog-post" table. However, there is an "image" column on the table used for the example on the documentation, which I can camouflage and use for video uploads (I've tried, it works). Now the problem is, I can't access the same table used in the example in my project, despite the fact that both project uses the same URL and KEY.
unwilling-turquoise•16mo ago
Hello @david4473 , no worries, I'd suggest creating a supabase for yourself and continue implementation on your own instance, so you'll be able to modify as you need. Please let us know if you have a specific issue with refine itself! Best.
rival-black•16mo ago
There isn't any issue with refine.
Thing is, I'm writing an article on how to use the react-player library with refine and supabase, and I want the readers to be able to quickly follow along with the examples in the article without having to set up supabase from scratch. I'd so much appreciate it if you guys could add a "videos" or "images" column to the supabase table.
Thanks guys. I needed to change the resources to "posts". I don't know how that eluded me.