Re: Parsing Multipart formdata
- From: "Cuong.Tong@xxxxxxxxx" <Cuong.Tong@xxxxxxxxx>
- Date: 15 Nov 2006 17:12:30 -0800
Hello Stephen,
I can get my code to do up to step 5 of your algorithm, which is to
readin in the headers eg: filename and contentType. After this, there
will be a \r and \n which consititue of 2 bytes.
Now, after reading this \r \n which seperate the part header and part
data, my stream position is now at the BEGINING of the binary stream or
base64 encoded stream as you mentioned.
And here is where I want to clarify something:
6. Start reading data into a string buffer.
So I can just have a string object then have buffer.readline ? And for
each of the line i compare it if it contains the boundary?
Is my data integrity will be broken, eg file corruption if i read the
stream in as string, then base64decode it, then convert it to bytes
array.
If reading the stream in doesnt break the data integrity, I think it
should be good because I can just read the wholething in with
stream.ReadToEnd(); then use regular expression or string.split to
split the multiparts to different part.
Kind regard,
.
- Follow-Ups:
- Re: Parsing Multipart formdata
- From: ssamuel
- Re: Parsing Multipart formdata
- References:
- Parsing Multipart formdata
- From: Cuong.Tong@xxxxxxxxx
- Re: Parsing Multipart formdata
- From: ssamuel
- Parsing Multipart formdata
- Prev by Date: Re: *int Vs IntPtr
- Next by Date: Re: ArrayList without Boxing and UnBoxing
- Previous by thread: Re: Parsing Multipart formdata
- Next by thread: Re: Parsing Multipart formdata
- Index(es):
Relevant Pages
|