0

I have been trying to upload an image from WP7 to a server for a few days now but it's not going too well.

I can easily get the input stream for the image and convert it to a byte array but I can't figure out how to send the byte array...Does it have to be done using a web service?

I've been struggling to send the byte array using the web service because the maxReceivedMessageSize is always set to 65536 and I have tried so many ways to increase the size of it.

Kara
  • 6,115
  • 16
  • 50
  • 57
  • possible duplicate of [windows phone 7 how to upload picture to server](http://stackoverflow.com/questions/5311403/windows-phone-7-how-to-upload-picture-to-server) – Matt Lacey Jul 11 '11 at 13:23
  • Can you share information about your server side environment? PHP catching the image? ASP? Something else? Also, I have run into issues uploading images on some web hosts using SSL. Turning off SSL allowed images to easily be transferred up to the cloud, which may or may not be acceptable based on your spec. – Jeremiah Isaacson Dec 19 '12 at 15:54

2 Answers2

0

The maxReceivedMessageSize is easy to fix in the configuration on the server.

Another way you could do it is to just make an asp.net mvc action which accepts a post, and just post it as a file.

Joel Martinez
  • 46,929
  • 26
  • 130
  • 185
0

Have a look at these other questions on the same subject:

Uploading an image using C# and WebRequest?
and
Upload files with HTTPWebrequest (multipart/form-data)

Community
  • 1
  • 1
Matt Lacey
  • 65,560
  • 11
  • 91
  • 143