Skip to content

Commit

Permalink
fixed bug w/ chunker that sent wrong content/type.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Bridgewater committed Oct 4, 2011
1 parent a316f90 commit bede4b7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions UploaderSL-v2/SLHttpUploader/HttpChunkUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ private void WriteFileContentRange(Stream destination, Stream source, string bou

var enc = new System.Text.UTF8Encoding(false, false);
string contentTemplate = string.Format("--{0}\r\nContent-Disposition: form-data; name=\"Chunk\"; filename=\"{1}\"\r\nContent-Type: {2}\r\n\r\n",
boundary, filename, DetermineMimeTypeFromExtension(filename));
boundary, filename, DetermineMimeTypeFromExtension(enumerator.Current.Name)); //use original filename.

byte[] temp = enc.GetBytes(contentTemplate);
destination.Write(temp, 0, temp.Length);
Expand All @@ -238,9 +238,6 @@ private void WriteFileContentRange(Stream destination, Stream source, string bou
destination.Write(buffer, 0, read);
currentFilePosition += read;//TODO: may need to add +1 here.
}

//temp = enc.GetBytes("\r\n");
//destination.Write(temp, 0, temp.Length);
}

#region Event Triggers
Expand Down

0 comments on commit bede4b7

Please sign in to comment.