M
M
mletov2019-09-06 10:12:02
JSON
mletov, 2019-09-06 10:12:02

FormData in Json, does it happen?

I ran into a problem:
There is a third-party API, you need to send 2 images in json format via the API, like

{"image1":"sdasdasas", "image2":"dsadsdadssdasdasdasas"}

But the bottom line is that the FormData type is written in the description of the fields , and it is json that needs to be passed. I have never encountered this.
Usually, if the image needs to be transferred to json, then base64 or an array of bytes is transferred.
If through FormData, then the data was transmitted in a separate array, not json.
Is it really possible to push FormData into json? I would appreciate examples. Calling the API is written in C#

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
mletov, 2019-09-07
@mletov

https://stackoverflow.com/questions/566462/upload-...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question