Urgent.News

What's breaking now, across thousands of outlets.

Tech

Let the browser set the multipart boundary for an image upload

Leave Content-Type unset in the request options when fetch() sends FormData . The browser adds the multipart boundary needed by that body. Build the form with const data = new FormData(); data.append("image", file); and pass it as the request body. A manually supplied Content-Type: multipart/form-data omits the boundary that the browser normally adds. Apply this rule to requests whose body is…

When using the fetch() method with FormData for uploading an image, it is important not to manually set the Content-Type header. The browser will automatically add the necessary multipart boundary for the image upload. To implement this, create a new FormData object, append the image file to it, and then pass the FormData object as the request body. Manually specifying Content-Type: multipart/form-data will remove the boundary that the browser typically adds.

Before attributing any issues to the image bytes, it is recommended to examine a shared request helper for an unconditional JSON or multipart header. Other than that, include any necessary authorization headers that your application requires.

To troubleshoot the issue, utilize a small non-sensitive test image. Utilize the MDN FormData guide to understand the boundary requirement. When submitting a bug report, specify the body type and header construction without including any sensitive information like credentials. The information provided here pertains to image preparation and review for the Morphio image project, which can be found at https://morphio.online/.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Building CivicGemma: A Tamper-Evident E-Voting Microservices Platform with Gemma 4 🗳️

🚀 TL;DR During Hacktoberfest Hack Day Bhubaneswar × DatrixLabs , I built CivicGemma — an open-source, full-stack microservices e-voting pilot system designed specifically for local body elections…

  • CivicGemma is an open-source e-voting system built on microservices for local body elections.
  • Platform uses Java 21, Spring Boot 3.4, Angular 22, and Gemma 4 multimodal AI.
  • CivicGemma addresses paper ballot inefficiencies, double-voting risks, and information asymmetry.

Invoice Ninja's Portal Is Not the Staff Console

Invoice Ninja's Portal Is Not the Staff Console Invoice Ninja exposes a staff-facing administration interface, a client portal, and an API.

  • ZoomEye's queries revealed 4,051 visible page titles, indicating multiple accessible paths.
  • Client portal should not allow one client to view another's invoices or download URLs.

ACH Return Codes Explained: R01 to R85 and How to Handle Them

ACH Return Codes Explained: R01 to R85 and How to Handle Them ACH Return Codes Explained: R01 to R85 and How to Handle Them When an ACH transfer fails, you don't get a generic "payment declined"…

  • R01 represents insufficient funds in ACH transfers, accounting for 30% of failures
  • R03 indicates no account or invalid account number, requiring permanent failure handling
  • R04 signifies invalid account number format, necessitating validation before submission

# 🛡️ Building an Enterprise AML/CFT Risk Intelligence Platform with Gemma 4

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine What I Built I built Risk-Gemma4-Agent , an enterprise-grade Anti-Money Laundering (AML) and…

  • Enterprise AML/CFT risk intelligence platform named Risk-Gemma4-Agent developed
  • Built using Google's open-weight Gemma 4 model and LangChain Vector RAG
  • Ensures 100% data residency and privacy compliance with DPDP Act

Prompt Spines for Lyric Drafts Before Genre Remix Passes

If your short-form pipeline treats “AI lyrics” and “AI remix” as interchangeable buttons, you will over-generate and under-learn from listens.

  • Prompt spine outlines chorus meaning, title fragments, sections, and constraints.
  • Spine acts as interface contract between AI generation stages.
  • Remix invoked after lyric keepers frozen and energy/genre issues addressed.

More from Saturday 31 October →