Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

1 vote
2 answers
79 views

express-validator rejects valid input

I have tried a lot to find the problem, but nothing worked. Here the details, including my errors (at the end). I am just putting the relevant code here. I use express-validator 7.1.0 I am trying to ...
j-menter's user avatar
1 vote
1 answer
131 views

Why is my form data being sent as application/json in my POST request, and why is it returning a Bad Request error?

I have a form to add hotel in the database. I am using react-hook-form. In the form, I am asking images as an input as well. Upon submitting the form, the data from the form is converted into form ...
Noor Fatima's user avatar
0 votes
1 answer
45 views

How to receive multipart data from Angular in Nest.JS API application

I'm trying to submit a small form including an image from an Angular project, and receiving it in a node.js API. Here is my Angular code: async save() { this.error = (!this.image || !this.email || ...
user176504's user avatar
7 votes
2 answers
5k views

Next.js 14: TypeError: s is not a function, while using formData()

Summary of the program: I am trying to upload an image to Next.js server-less backend. I use formData() to append/set the data and POST it using axios to the backend. In the backend, I am requesting ...
Ajaz's user avatar
  • 71
2 votes
1 answer
421 views

How do I create a NestJS endpoint that accepts exactly two files in addition to a string field?

Im' using NestJS 10. I would like to design an endpoint that accepts one string field and two files (named "frontImg" and "backimg"). I have created this endpoint @Post() @...
Dave's user avatar
  • 17.4k
0 votes
0 answers
29 views

FormData of file array not working in React Native

I'm trying to upload video file from expo react-native to express backend. I'm using multer middleware for express. I tested backend with react frontend. this is react front-end code import { useState ...
Lee's user avatar
  • 1
0 votes
1 answer
42 views

Creating a Node server that relays file to another server(multer)

In my project, the setup is: Client -> relay server Relay server -> Resource server I am creating an API which will save the data on the Resource server. So, I have to upload the file to my ...
ritwick_ _D's user avatar
1 vote
1 answer
48 views

Image not uploading in the multipart/for-data form

const handlesubmit = async (e) => { e.preventDefault(); try { setshowloader(true); const data = { en_name: engName, hi_name: hiName, employeeID: EID, AadharNo: aadharNo, ...
Mayank Painkra's user avatar
0 votes
2 answers
1k views

Multipart: Unexpected end of form with nestjs

@Post() @Roles('USER', 'ADMIN') @ApiBody({ description: 'Upload file', type: 'object', required: true, }) @UseInterceptors(FileInterceptor('file')) @ApiConsumes('multipart/form-...
Y.O.AK's user avatar
  • 1
1 vote
1 answer
486 views

Issue When Uploading to Meta Resumable Upload API

I am trying to use Meta's Resumable Upload API from my express.js server following Meta's Resumable Upload API documentation. Expected: The file will get uploaded to Meta and I will get the uploaded ...
danielR2001's user avatar
0 votes
0 answers
85 views

How to get multiple files at node js backend from react frontend i am getting req.files empty

I am Not getting the files at backend which i want to submit in mongodb schema this is front end code how i am sending data it is my backend api where i am getting req.files empty,I ahve tried many ...
Akshat Jain's user avatar
0 votes
1 answer
109 views

MERN formdata with values and an Image file not being sent to the express server

I am trying to send FormData from my react front-end to my express backend. The formdata contains some key:value pairs for registration and an Image file, The problem is that the server isn't able to ...
Silenx's user avatar
  • 47
0 votes
1 answer
1k views

Base64 encoded PDF upload keeps being stored as text instead of as file

I am trying to send a PDF file through multipart/form-data to Box.com's API. The PDF data is encoded in Base64. Since my module is being run through the GraalVM, which is setup in a way that node's ...
Matthew Carter's user avatar
0 votes
1 answer
44 views

multer removes the body from the incomming request

I send an http post request from a simple Angular app in a form of FormData which is set the content type to multipart/form-data, the back-end receives the incoming request and parses it using multer ...
Sherif eldeeb's user avatar
1 vote
0 answers
1k views

Unexpected end of form at .callFinal error

I'm trying to send a new FormData() as the body of a POST request using axios and Multer to handle multipart form data, locally it works without any issues but on our live envs I keep getting ...
Dzsonah's user avatar
  • 135

15 30 50 per page
1
2 3 4 5
8