fork download
  1. function setimage() {
  2. var $input = $("#uploadimage");
  3. var fd = new FormData;
  4.  
  5. fd.append('img', $input.prop('files')[0]);
  6.  
  7. $.ajax({
  8. url: 'http://localhost/gallery/app/upload_check.php',
  9. data: fd,
  10. processData: false,
  11. contentType: false,
  12. dataType: 'json',
  13. type: 'POST',
  14. success: function (data) {
  15. if (data['result'] === "success") {
  16. $("#divErrorMessages").fadeOut(500, function () {
  17. $noerror = $('#divErrorMessages').empty();
  18. });
  19. ($('#divResults').html(data['message']).css('display', 'block'));
  20. } else {
  21. $("#divResults").fadeOut(500, function () {
  22. $error = $("#divResults").empty();
  23. });
  24. ($('#divErrorMessages').html(data['message']).css('display', 'block'));
  25. }
  26. }
  27. });
  28. }
Success #stdin #stdout 0.02s 10712KB
stdin
Standard input is empty
stdout
Standard output is empty