title: DailyMotion Upload API missing file error
body: <p>I am trying to upload an mp4 video to the DailyMotion Upload API. When I send the file content, I receive an error response as below.</p>
  
  <pre><code>Id = 31, Status = RanToCompletion, Method = "{null}", 
  Result = "{\"error\":\"missing file\",\"seal\":\"4a24a4c8a51771d9d3b8bcd4462e721b\"}"
  </code></pre>
  
  <p>I am using C# in .net 4.5 and have generated the following calls:</p>
  
  <pre><code>POST [[UPLOAD URL]] HTTP/1.1
  Accept: */*
  Content-Type: multipart/form-data; boundary="c83ccd81-39f7-4167-a8f1-74ab63eb4219"
  Host: upload-01.sv6.dailymotion.com
  Content-Length: 9893501
  Expect: 100-continue
  
  --c83ccd81-39f7-4167-a8f1-74ab63eb4219
  Content-Disposition: form-data; name="file"; filename="TESTFILE.mp4"
  Content-Type: application/octet-stream
  
  [[[FILE BINARY]]]
  </code></pre>
  
  <p>I have successfully uploaded using DailyMotion's CURL sample. Using Fiddler, CURL generates the following:</p>
  
  <pre><code>POST [[UPLOAD URL]] HTTP/1.1
  User-Agent: curl/7.33.0
  Host: upload-02.sv6.dailymotion.com
  Accept: */*
  Connection: Keep-Alive
  Content-Length: 9893509
  Expect: 100-continue
  Content-Type: multipart/form-data; boundary=------------------------a49610ec11411f2a
  
  --------------------------a49610ec11411f2a
  Content-Disposition: form-data; name="file"; filename="TESTFILE.mp4"
  Content-Type: application/octet-stream
  
  [[FILE BINARY]]
  </code></pre>
  
  <p>The file binary looks good and the only differences I see are the connection and User-Agent headers. Researching the Connection header, it looks like Keep-Alive is unnecessary with HTTP/1.1. I have tried several different User-Agents (Mozilla, CURL, IE) but no change in response. </p>
  
  <p>I appreciate any insight into what is happening. 
  Thank you!</p>
  
  <p>EDIT Added code:</p>
  
  <pre><code>mediatype = "video/mp4"
  name = "file"
  filename = "file"
  data = {byte[9893291]}
  
   public async Task UploadRequest(string mediatype, string name, string filename, byte[] data)
      {
          using(HttpClient httpClient = new HttpClient())
          {
              var requestContent = new MultipartFormDataContent();
  
              httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("*/*"));
  
              var videoContent = new ByteArrayContent(data);
              videoContent.Headers.ContentDisposition = new ContentDispositionHeaderValue("form-data");
              videoContent.Headers.ContentDisposition.Name = "\"file\"";
              videoContent.Headers.ContentDisposition.FileName = filename;
              videoContent.Headers.ContentType = MediaTypeHeaderValue.Parse("application/octet-stream");
  
              requestContent.Add(videoContent, name);
  
              Apirequest.HttpRequestMessage.Content = requestContent;
  
              Apirequest.HttpResponseMessage = httpClient.SendAsync(Apirequest.HttpRequestMessage).Result;
              Apirequest.HttpResponseMessage.EnsureSuccessStatusCode();
  
          }
      }
  </code></pre>
  
  <p>EDIT Updated following help</p>
  
  <pre><code>POST http://upload-02.nyc.dailymotion.com/upload?uuid=c8542d0a9be73c55fbace1ee4aa1744b&amp;seal=4770461f7f07b4e0c15750d70bc44377 HTTP/1.1
  Accept: */*
  Content-Type: multipart/form-data; boundary=62fcae82-e1b2-4df3-99c4-90fad29be62d
  Host: upload-02.nyc.dailymotion.com
  Content-Length: 9893493
  Expect: 100-continue
  
  --62fcae82-e1b2-4df3-99c4-90fad29be62d
  Content-Disposition: form-data; name="Testfile.mp4"; filename=Testfile.mp4
  Content-Type: application/octet-stream
  
  ���ftypmp42���mp41mp42isom���wide���mdat!�@h!
  �Ќ&gt;��SZa��x�M�޹SZa��{�!
  �ˊ��]C���I��x�8V]�F}=�_Pc1�w�d&gt;��.�!
  ������hRDq��0�`D�4�QG��A��nn��û�6��ݳ���ι�τpE����s���8)�=����^�ʇ�/�N8k.��]Jr)�z���pTR�
  =}.�!
  [[FILE GOES ON]]
  ðb ’h  'v† )ˆI 7| F3• Ršv _Ê0 kC yDÀ ‚¡] ‰¢ h ŽÂi /
  ×ÿ  ¥ Ó
  ‘`Q ‘É ’Ö ’K ’Õ ’ÿ\ “ˆŠ “³Â ”"G ”7»   +udta   #titl    ÇTestFile 
  --62fcae82-e1b2-4df3-99c4-90fad29be62d--
  </code></pre>
  
  <p>EDIT: A code example of the fix was requested. It is as follows:</p>
  
  <pre><code>videoContent.Headers.ContentDisposition.FileName = "\"" + name + "\"";
  </code></pre>