I assume the USB storage is connected to the NETMF device and the WebServer is somewhere in the internet.
I can not help you with the HTTP stuff, but I can assist you with uploading the file.
Normally you have some kind of stream where you write your data to (uploadStream).
And you have a fileStream to the file on USB device.
Then you create a ‘small’ buffer (lets say about 10k) to which you read from file and the write to uploadStream.
// get the uploadStream from HTTP request, FTP, ...
var uploadStream = ...
using (var fileSTream = new FileStream("path to file"))
var buffer = new byte[10 * 1024]; // you can adjust the buffer size to get optimal performance
// read 1st chunk
int cnt = fileStream.Read(buffer, 0, buffer.Length);
while(cnt > 0)
// write to upload stream
uploadStream.Write(buffer, 0, cnt);
// read next chunk
cnt = fileStream.Read(buffer, 0, buffer.Length);
// done, close/finalize uploadStream if necessary
I hope this helps.
(code is actually not checked for syntax errors, just typed it directly in here)