All Questions
102
questions
1
vote
0
answers
31
views
Post form data inside an array of objects
Hello I've been working in a blog to post blogs, you can add images too
For add image system i use Multer and Path.
To save the image, I save it in a FormData, with its key, so Multer can read the ...
0
votes
1
answer
51
views
React Native, Sending Image From Axios but not receiving at Multer Express JS
I am not able to receive image sent from axios/react native at express js server. It works fine when i sent the same request to server from Postman/ThunderClient.
Here is a code which i have used in ...
0
votes
0
answers
65
views
nodejs Multer middleware req.file undefined but req.body hail
I want to upload images with Multer and when I test it with postmanden it works fine but when I send a request with axios the req.file is undefined but I get the data I want in req.body and I get ...
1
vote
1
answer
152
views
Image shows correctly in network "Preview" but on its response.data it's all broken gibberish
My issue is the following
Inside /uploads/{userid}/ there is a single image I named user-pf.png, I can access that folder just right and retrieve the image from it, but my frontend doesn't display it ...
0
votes
0
answers
23
views
Pictures undefined with multer
images.files are undefined with multer. when I simply use router.post...
it works, but if I use authRouter it doesn't work anymore, the files are undefined
I'm getting these errors.
error request ...
0
votes
2
answers
75
views
multer file is undefined in express server
Here is my axios post request.
await axios
.post(
status === "register"
? "api/v1/publicUsers/register"
: "api/v1/publicUsers/login",
formData,
{
...
0
votes
0
answers
86
views
Sending a file to the server WITHOUT using multer
I have a MERN stack app in which I'm sending text data and an image file to the server. I can see in the chrome network tab that all the fields are being sent in the payload, however, I am not ...
0
votes
0
answers
359
views
Error 500 when uploading images with React and Express using Multer
I'm having trouble trying to upload an image from my React component using Express on the backend side and Multer as the middleware to manage the upload process. I've configured Multer on the backend ...
0
votes
0
answers
130
views
Why am I getting 400 bad request error in this node.js code?
Can anyone help me with this node.js code? I deployed and ran it but getting 400 bad request. Here is the code:
const express = require("express");
const app = express();
const bodyParser = ...
0
votes
1
answer
44
views
I don't understand why the POST request is returning an axios 404 error
The axios post request keeps returning a 404 error even though the route seems to be correct.
The put request also stops wrking when I add the POST request but goes back to work normally after ...
1
vote
0
answers
47
views
Image upload failed using multer
I am trying to upload the Image to my Images folder in the react project using axios but its not working:
Backend files:
Index.js
const connectToMongo = require('./db');
const express = require('...
0
votes
1
answer
214
views
how do I fix that axios sends jpeg instead of jpg to back end?
SO I'm trying to send an image from the react front end to the node.js back end but when I send a .jpg to the back end and I ask there what tpye it is sais it's a jpeg while multer still thinks its a ...
1
vote
0
answers
283
views
Uploading formData from React Native to Node.js (multer) with axios - Getting AxiosError: Network Error
Im trying to upload an image as FormData for my backend. that is working well without the frontend request (using postman form data setting a key "name" with value "perfil", an a ...
0
votes
0
answers
36
views
req.file undefined with axios and multer [duplicate]
I'm currently working on a React application and want to upload an image to the server. So I decided to use Axios on the client side and Multer on the server side. Here are my codes.
client side
...
0
votes
0
answers
427
views
Im getting MulterError: Unexpected field error from backend express, how to fix my code
im trying to make something like google drive, but my own, started with very simple file/image uploading, down here is my Node.js Back-end, and more down there is my Front-end JavaScript/Axios/React/...