title: Request.InputStream in ASP.NET Core
body: <p>I'm trying to use this library in ASP.NET Core: <a href="https://github.com/infusion/jQuery-webcam" rel="noreferrer">https://github.com/infusion/jQuery-webcam</a> to get the picture taken from a webcam.</p>
  
  <p>In this example, <a href="https://stackoverflow.com/questions/40371106/mvc-capture-webcam-image-save-file-path-of-image-to-the-database">MVC Capture webcam image, save file path of image to the database</a>, this is what happen:</p>
  
  <pre><code>$(document).ready(function () {
                          $("#Camera").webcam({
                              width: 320,
                              height: 240,
                              mode: "save",
                              swffile: "@Url.Content("~/Scripts/jscam.swf")",
                              onTick: function () { },
                              onSave: function () {
                              },
                              onCapture: function () {
                                  webcam.save("@Url.Action("Capture", "TrapActivity", new { id = @Model.Id , pid = @Model.PersonId})");
                              },
                              debug: function () { },
                              onLoad: function () { }
                          });
                     });
  </code></pre>
  
  <p>A Controller method called <code>Capture</code> is called from the View in this line: <code>webcam.save("@Url.Action("Capture", "TrapActivity", new { id = @Model.Id , pid = @Model.PersonId})");</code></p>
  
  <pre><code>public ActionResult Capture(string ID)
      {
          var path = Server.MapPath("~/Images/ID_" + ID + ".jpg" );
  
          //var path1 = "~/Images/test.jpg;";
  
  
  
          var stream = Request.InputStream;
          string dump;
  
          using (var reader = new StreamReader(stream))
              dump = reader.ReadToEnd();
  
  
          if (System.IO.File.Exists(path))
          {
              System.IO.File.Delete(path);
              System.IO.File.WriteAllBytes(path, String_To_Bytes2(dump));
          }
          else System.IO.File.WriteAllBytes(path, String_To_Bytes2(dump));
  
  
          return View(ID);
  
      }
  </code></pre>
  
  <p>Inside it, there is a <code>var stream = Request.InputStream;</code>.</p>
  
  <p><strong>The problem is that in ASP.NET Core there is NOT a</strong> <code>Request.InputStream</code>.</p>
  
  <p>What can I use instead?</p>