0

I use the AFNETWORKing write a iOS client to send the *.jpeg from iOS device. Now,I can receive the stream from the ios. If I save this stream to a jpeg file, it cannot be opened. I use the notepad++ open it and find this not all the stream is jpeg data.

its header likes this:

--Boundary+3064FAAD3A74E02F
Content-Disposition: form-data; name="file"; filename="test.jpg"
Content-Type: image/jpeg
----others code

how can I save this stream?

1 Answers1

0

I sold it myself.Now I know the problem which I meet. I need to encode the stream and split it find the key work I need. I am sure that the afnetwork has sent the content-type,filename into the stream. I find this poster:here

if you want to see more problem like this,Google the key word: multipart/form-data and wcf

Community
  • 1
  • 1