I'm looking to post a static default photo image in my asset folder to my endpoint if no image was uploaded to the input fileuploader. How do you send that through the body. I tried to send the import variable for it but upon getting the image it wasn't correct. Whats the correct way to go about this?
import DefaultPic from '../../../assets/avatars/default.png';
axios.post(process.env.REACT_APP_HOST + process.env.REACT_APP_PORT + '/users',
{
firstName: this.state.firstName,
lastName: this.state.lastName,
image : DefaultPic
}
)