How to pass an image to the backend from react and redux
问题 I'm using the MERN stack and I want to be able to upload an image in the front end (react) and access it in the backend (express, nodejs) to store it later. I'm using multer but I keep getting undefinied when I try to console.log() the req.file object. frontend: import React, { Component } from "react"; import { Link, withRouter } from "react-router-dom"; import { connect } from "react-redux"; import PropTypes from "prop-types"; import { addPlayer } from "../../actions/profileActions"; class