views:

116

answers:

1

Hi, I dont know if it is a problem with my iPhone code or SERVER.

I am uploading Image/Audio from iPhone to server using NSURLConnection. The images and audio get uploaded just fine if their size is less than 60KB.

If it is more than 60KB, I get a 400 Bad Request response from the server. I am not sure whats happening. I am clueless can someone help me

My webserver is IIS running on Windows 2008 R2. Web service is developed in .NET

Regards

A: 

sounds like just one chunk of data is send.

I am using ASIHTTPRequest for receiving/sending data.

ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
[request addPostValue:@"Ben" forKey:@"names"];
[request addPostValue:@"George" forKey:@"names"];
[request addFile:@"/Users/ben/Desktop/ben.jpg" forKey:@"photos"];
[request addData:imageData withFileName:@"george.jpg" andContentType:@"image/jpeg" forKey:@"photos"];
vikingosegundo