Guest User

Untitled

a guest
Oct 23rd, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. var file = model.ImageFile;
  2.  
  3. if (file != null)
  4. {
  5.  
  6. file.SaveAs(Server.MapPath("/path/" + file.FileName));
  7.  
  8. }
  9.  
  10. return Json(imageId, JsonRequestBehavior.AllowGet);
  11.  
  12. }
  13.  
  14. $.ajax({
  15. type: "Post",
  16. url: "@Url.Action("RMAImageUpload", "ImageStores")",
  17. data: formData,
  18. datatype: "json",
  19. processData: false,
  20. contentType: false,
  21. success: function(response) {
  22. ClearPreview();
  23. $("#uploadedImage")
  24. .append('<img src="/UploadedImage/' + response + '" class="img-responsive thumbnail"/>');
  25. }
  26. });
Add Comment
Please, Sign In to add comment