
In this post, we’ll walk through our journey integrating the Sightengine image moderation API into a Node.js application. Along the way, we encount...
For further actions, you may consider blocking this person and/or reporting abuse
Great breakdown! Switching from native fetch to form-data in Node.js can really smooth out multipart uploads, especially when dealing with image moderation APIs. And that sneaky DNS resolution issue? Classic Node headache — glad you tackled it head-on. These kinds of insights save devs a ton of debugging time!
Thanks! 🙌 Yeah, switching to form-data made a huge difference
Great insights! I’ve faced similar issues with Undici’s FormData while managing file streams — it’s really frustrating when it fails without any notice during an API upload.
If you’re debugging this: make sure your multipart payload is actually streaming, and don’t underestimate the quirks of DNS resolvers on Linux (I’ve been caught out by 127.0.0.53 more times than I can count).
A good fallback is using node-fetch with form-data. I’m curious if you’ve tried axios too? It’s great with streams, but it does come with a bit of overhead.
I’ve mostly stuck with node-fetch + form-data as a reliable combo, but haven’t seriously tried axios for stream uploads yet.
The DNS resolution issue via systemd-resolved was especially tricky—thanks for highlighting that fix. Also appreciate the clarity on Undici's Blob vs. stream limitations; it's not well-documented and can waste hours. The final solution with form-data and node-fetch is battle-tested and solid.
Glad the fix helped!
pretty cool seeing someone stick it out til stuff finally works - you think it’s patience or just stubbornness that actually makes you push through all the tech headaches?
Honestly, probably a mix of both
Super helpful breakdown - I’ve run into almost the exact same fetch vs. form-data headaches.
Did you see any signs that native APIs might eventually make this less painful?
Appreciate it! Yeah, you're definitely not alone—handling fetch and form-data in Node can feel way rougher than it should be. As for native APIs, there's some movement: newer Node versions are gradually aligning more with web standards (like the experimental FormData and Blob in undici), but there’s still a lot of edge-case pain, especially with streaming.
what a great approach