title: File upload with ember-upload, how to fill request with additional data for servicestack?
body: <p>For introduction, I have problem with communication between servicestack and application written in ember.js via REST, I am using <a href="https://github.com/benefitcloud/ember-uploader" rel="nofollow noreferrer">ember-uploader</a> component to upload a file to service stack. </p>
  
  <p>View hbs:</p>
  
  <pre><code>&lt;table class="table table-bordered table-hover"&gt;
  {{file-upload}}
  &lt;/table&gt;
  </code></pre>
  
  <p>component in coffee script</p>
  
  <pre><code>  ABC.FileUploadComponent = Ember.FileField.extend(
    url: "/api/upload"
    filesDidChange: (-&gt;
      uploadUrl = @get("url")
      console.log uploadUrl
      files = @get("files")
      test = { fileName: "test" }
      uploader = Ember.Uploader.create(
          url: uploadUrl
      )
  
      uploader.upload(files[0],test) unless Ember.isEmpty(files)
      console.log files
      return
    ).observes("files")
  )
  </code></pre>
  
  <p>component in javascript</p>
  
  <pre><code>ABC.FileUploadComponent = Ember.FileField.extend({
    url: "/api/upload",
    filesDidChange: (function() {
      var files, test, uploadUrl, uploader;
      uploadUrl = this.get("url");
      console.log(uploadUrl);
      files = this.get("files");
      test = {
        fileName: "test"
      };
      uploader = Ember.Uploader.create({
        url: uploadUrl,
        data: test
      });
      if (!Ember.isEmpty(files)) {
        uploader.upload(files[0], test);
      }
      console.log(files);
    }).observes("files")
  });
  </code></pre>
  
  <p>My service model:</p>
  
  <pre><code>namespace ABC.Service.ServiceModel
  {
      public class Upload
      {
  
          [Route("/upload")]
          public class UploadRequest : IRequiresRequestStream
          {
              public System.IO.Stream RequestStream { set; get; }
  
              public object FileName { set; get; }
  
          }
  
          public class UploadResponse
          {
              public int Successed { set; get; }
  
          }
      }
  }
  </code></pre>
  
  <p>My Service Method</p>
  
  <pre><code>namespace ABC.Service.Service
  {
      public class UploadService : ServiceBase // Service base inherites from ServiceStack.Service
      {
          public Upload.UploadResponse Post(Upload.UploadRequest request)
          {
              var req = base.Request;
              var reqThatIwant = request.FileName;
  
              return new Upload.UploadResponse() { Successed = 1 };
          }
  
      }
  }
  </code></pre>
  
  <p>and here is screen from watch :</p>
  
  <p><strong>So my question is, how I have to change the code to get data marked as "2" into Request object marked as "1" (marked on the screen)?</strong></p>
  
  <p><img src="https://i.stack.imgur.com/pXO69.png" alt="add watch screen shoot"></p>