[mono-android] System.Net.WebClient.UploadFileAsync Problem
subsembly
a.selle at subsembly.com
Thu Jan 19 15:25:32 UTC 2012
Hi all,
just when I thought all troubles with WebClient are gone, I encountered a
new one. This time the compatibility problem is with the
WebClient.UploadFileAsync() method. When using this method in order to
upload a file, the other end receives a binary stream wrapped as follows
(example):
--------------8cea4d9249390f8
Content-Disposition: form-data; name="file"; filename="Android.sub"
Content-Type: application/octet-stream
[...actual file data...]
--------------8cea4d9249390f8--
However, in the real Windows .NET Framework the very same method transmits
the net file data, without wrapping it like a form data post. Hence our old
Windows file uploading code actually corrupts files when uploading from Mono
for Android.
BTW: I also tried this same with MonoTouch, which behaves exactly like Mono
for Android.
Best regards,
Andreas
--
View this message in context: http://mono-for-android.1047100.n5.nabble.com/System-Net-WebClient-UploadFileAsync-Problem-tp5157961p5157961.html
Sent from the Mono for Android mailing list archive at Nabble.com.
More information about the Monodroid
mailing list