title: Summernote upload file to server
body: <p>I am currently do following instruction to process image upload from summernote control in ASP.NET MVC Razor.</p>
  
  <p><strong>Server code:</strong></p>
  
  <pre><code>[HttpPost]
      public ActionResult UploadImage(HttpPostedFileBase file)
      {
          var imageUrl = UpdateProfilePicture(file);
          return Json(imageUrl);
      }
  </code></pre>
  
  <p>And
  <strong>Client side ajax:</strong></p>
  
  <pre><code>&lt;script&gt;
  $('.summernote').summernote({
      height: 200,
      focus: true, onImageUpload: function (files, editor, welEditable) {
          sendFile(files[0], editor, welEditable);
      }
  });
  function sendFile(file, editor, welEditable) {
  
      console.log(file);
      $.ajax({
          data: {file:file},
          type: "POST",
          url: "@Url.Action("UploadImage","Message")",
          cache: false,
          contentType: false,
          processData: false,
          success: function (url) {
              editor.insertImage(welEditable, url);
          }
      });
  }
  </code></pre>
  
  <p></p>
  
  <p>I got a result at server side method, but parameter <code>HttpPostedFileBase file</code> is null</p>
  
  <p>some examples says that works, but my code doesn't work functionally !</p>
  
  <p>Any ideas ?</p>