PricingBlog

Upload progress bar

  • alexsiale_17363-1278973406406119529

    Alex

    1 year ago

    Hey everyone! User testing on my new directory platform built in toddle is in full swing!

    Already fixed a bunch of bugs / UI/UX issues and it’s super efficient now.

    I need help creating a loading bar or progress UI to show the user when their file upload on an input is complete or in progress.

    The problem is that people are uploading a file and submitting the form before my GET UPLOAD URL and UPLOAD FILE API calls are complete.

    Causing the image to make it to storage but not make it to the new row being inserted.

    How would one create such a progress bar or visual loading component?

    See my build here: https://discord.com/channels/972416966683926538/1275432013331042377
  • tomthebigtree-1278976801082835036

    Tom Ireland

    1 year ago

    I think @NoCode ProCode covered that in his file upload video and used a pure CSS spinner icon to be displayed when isLoading was true via the API. You could have something like that, which also prevents the submit/upload button from being available e.g. set disabled attr is true when isLoading is true, or something along those lines. I think FileReader API also provides some event listeners for upload states but that would need a custom action.
  • alexsiale_17363-1278977094155505726

    Alex

    1 year ago

    Oh nice Tom! This looks like a promising avenue. I'll watch that video first and come back here with updates!
    👍1
  • tomthebigtree-1278977616270987274

    Tom Ireland

    1 year ago

    You could also use styles to change the button state appearance e.g. make it appear disabled as well as making sure it actually is while everything is making its merry way over the wire.
  • tomthebigtree-1278977999609528374

    Tom Ireland

    1 year ago

    Nice UX then and obvious something is happening for the user before they click upload.
  • tomthebigtree-1278978284004053054

    Tom Ireland

    1 year ago

    Well done on your progress btw. Sounds like it’s going well.
  • alexsiale_17363-1278978933819445340

    Alex

    1 year ago

    Thanks Tom! Yes, just trying to ship it as fast as possible inbetween running my current biz activites haha
  • Gonna get these 5 users fully onboarded and happy, then open I think a tiered priced approach. First 30 users get $99 lifetime membership, then increase in cohorts 🙂

    Lets see!
    🔥1
  • tomthebigtree-1278979313324134451

    Tom Ireland

    1 year ago

    Smashing it, mate!
  • nix.nz-1279001241137057812

    Marko

    1 year ago

    This is good info, I’m building an upload feature on my app as well, cheers peeps!
    🙌1
  • tcg.store-1279105501476421704

    TCG.Store

    1 year ago

    Also Shoelace package has a good progress bar you can use and customize. Just in case you want to get fancy 🙂
    1279105501124366480-CleanShot_2024-08-30_at_11.47.38.png
  • It also allows you to add a custom value to match the upload percentage using the component attributes
  • alexsiale_17363-1279137359002079384

    Alex

    1 year ago

    Oh wow that’s cool
  • chrislaupama-1279205624261120072

    Chris Laupama

    1 year ago

    When uploading files over 6mb it’s recommended to use the resume upload endpoint:

    https://supabase.com/docs/guides/storage/uploads/resumable-uploads
  • alexsiale_17363-1279294837669232666

    Alex

    1 year ago

    Ohhhhh this is probably my issue
  • Would I use two calls or just use this as default?