skip to Main Content

Upload base64 image as a like file input with file name using AJAX – Jquery ajax

On server side I have spring MVC (JAVA) project which accepts multipart/form-data with MultipartFile @RequestMapping(value = { "/uploadImg/**" }, method = RequestMethod.POST) public void uploadImg(Model model, HttpServletRequest request,HttpServletResponse response,MultipartFile file ) { String originalFileName = file.getOriginalFilename(); //some cases on based…

VIEW QUESTION

Display image from flask send_file (ajax response) into the image tag – Jquery ajax

How do I display the image from a flask send_file ajax response HTML file <button class="button" id="start">Start</button> <script> //start button click event $('#start').click(function() { $.ajax({ url: 'http://127.0.0.1:5000/capture', type: 'GET', contentType: "image/jpg", success: function(result) { document.getElementById('frame').src = 'data:image/jpg,' + result; }…

VIEW QUESTION
Back To Top
Search