Receive an image by JSON

0

I have the following problem; I have a Rest service with ASP.Net MVC and I am currently receiving the image by base64 and it ends up giving me a km json to save, so I wanted to know how to receive the binary information (as much as possible I would keep it in database as varchar to be able to make a transition not so abrupt) and from there I have to recover it again to the binary to be able to show it on the web / application that I am developing. What I'm going to do is, how should I receive the value? as blob? and how should I store it in the database? (if you can not save it as varchar, I could save it as another value more compatible, I can modify the database if necessary)

    
asked by Pablo Ezequiel Ferreyra 18.10.2018 в 02:23
source

1 answer

0

There are bookstores that could help like being

jQuery-File-Upload

with this you could send data and upload in the same operation

Analyze punctually

How to submit additional data form

You'll see how you can upload and upload a json when you use

 $('#fileupload').fileupload({
     formData: {example: 'test'}
 });

that the formData is the body that will be received as a post, what test says that is the data there you will put the serialized json that will be sent next to the file when the upload is done

    
answered by 18.10.2018 в 07:44