S
S
SheDeMere2021-07-21 13:16:17
React
SheDeMere, 2021-07-21 13:16:17

How to send photo from input file to json server?

How to send selected photo to json server? stack: React, Redux, Json-server.
I looked at a lot of videos, I really did not find anything.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Makarov, 2021-07-21
@serbananas

https://www.youtube.com/watch?v=fnzO0U1mSb8&list=P... here is the video, everything is explained there

N
Nadim Zakirov, 2021-07-21
@zkrvndm

If you want to send a photo to the server inside JSON, then first you will need to convert the photo itself to base64! On the server, accordingly, base64 will need to be converted back to a file. Solve this question first, and only then google how to send JSON to the server using AJAX.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question