Request Header corrupting custom upload.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Request Header corrupting custom upload.

Guest-955

I have been working on a ASP.NET C# solution to seperate an uploaded file into equal sized blocks for mass storage puposes. To do this I have created a custom Stream class which gets created in an overloaded UploadedFile.CreateStream function. The custom stream class overrides the Write function to write the input data to seperate indexed block files.

The problem is that the resulting uploaded file is being corrupted because what seems to be the request header is being included in the data being written to the stream and is actually replacing the same sized expected data. In other words, the data that describes the file (bitmap header, jpeg header) is being replaced with the request header. The size of the replaced data hovers around 650 bytes. Also, the total file size at the end of the stream is equal to expected file size.

Can someone shed some light on theis problem, please.

Reply | Threaded
Open this post in threaded view
|

Re: Request Header corrupting custom upload.

Dean Brettle
Administrator
Weird. Can you email me (dean at brettle dot com) a test app that demonstrates the problem, including source for your custom provider? What version of NeatUpload and browser are you using?
Reply | Threaded
Open this post in threaded view
|

Re: Request Header corrupting custom upload.

Dean Brettle
Administrator
Your implementation of Stream.Write() is incorrectly ignoring the offset parameter.

--Dean