Pricing Blog

How to simulate a loop natively in Nordcraft?

  • uunicode-1375183208261357739

    unicodes

    2 months ago

    I need to simulate a loop for calling this supabase upload request. I want to do it native in Nordcraft, is it possible?
    1375183209004011520-Screenshot_2025-05-22_at_21.45.57.png
  • lucasg-1375183356312162385

    Lucas G

    2 months ago

    You can do a recursive workflow
  • andreasmoller-1375183389115551884

    Andreas Møller

    2 months ago

    Ahh so close
  • I gotta be faster next time
  • Ideally you have a backend that supports uploading multiple items in one request.

    Anytime you are doing async requests (like api calls) in a loop there is a big chance of performance problems
  • Given the name of the API it ,sounds like that could be possible
  • uunicode-1375183834433454221

    unicodes

    2 months ago

    Supabase doesn't support bulk upload as per info I found 😦
  • lucasg-1375183840800149696

    Lucas G

    2 months ago

    Unfortunately Supabase doesn't support it via their REST API (I think it's what he uses)
  • In the supabase upload package there's an example of how to make a basic loop with workflows
  • andreasmoller-1375184145482776658

    Andreas Møller

    2 months ago

    That does not make much sense. Their SKD uses the REST api no?
  • lucasg-1375184327977078856

    Lucas G

    2 months ago

    Their JS lib has a few different features that aren't there in the REST API I believe
  • lucasg-1375184768060100619

    Lucas G

    2 months ago

    Actually I don't remember who it was that said that the JS lib supported multiple uploads.
  • I don't even know if that's accurate
  • One sec
  • Gotta verify
  • uunicode-1375185271200682075

    unicodes

    2 months ago

    Now you will find out that bulk upload is also possible 🔥. Have you seen that episode of Black Mirror with the girl who whispers something and it becomes reality?
  • lucasg-1375185402281070775

    Lucas G

    2 months ago

    It was not true, the JS lib doesn't support batch uploads either. Fake news
  • You have to loop either way
  • uunicode-1375185788999831693

    unicodes

    2 months ago

    It's okay, I'm uploading images by drop just for fun, to avoid using the traditional button, and the loop works fine.