Pricing Blog

Supabase File Upload Reset

  • alexsiale_17363-1314160477705863269

    Alex

    6 months ago

    Do I have to reset my 'FILE' variable in between multiple uploads using the same form after completion?

    If I use the form once, file goes to storage and the new 'case study' record is created... But If I do it a second time, the image doesn't get attached to the new record in supabase and my 'FILE' variable shows as NULL...

    Do I need to do some sort of reset on the input field or the variable?
    1314160478376689736-Screenshot_2024-12-05_at_10.23.22_PM.png
  • lucasg-1314280655537831936

    Lucas G

    6 months ago

    Sometimes you have to do a reset on the input
  • The supabase upload package has an action for it
  • alexsiale_17363-1314301333733380126

    Alex

    6 months ago

    I couldn’t style your package
  • I used it but then swapped back cause I couldn’t figure out how to edit styling
  • Also, how do I use the “loop for toddle” to do multi upload?
  • lucasg-1314306450268622849

    Lucas G

    6 months ago

    No the package has no options to style
  • I put it out primarily as a point of reference for people though apparently some use it as-is
  • lucasg-1314306862950387713

    Lucas G

    6 months ago

    Perhaps I could just add a slot to it to so users can add their own button to it
  • Since it also doubles as a download button, it might get confusing
  • lucasg-1314307337154199663

    Lucas G

    6 months ago

    Anyways the loop is also in the package. Try cloning it to see how it works
  • It just uses a workflow that calls itself to handle multiple uploads
  • alexsiale_17363-1314309396695748608

    Alex

    6 months ago

    Okay cool I’ll have. A play

    Thanks
  • I haven’t done much cloning or component work so this will be good practice