Note that there are some explanatory texts on larger screens.

plurals
  1. POPOST an image in specified place with coordinates
    text
    copied!<p>I know this question may seem a duplicate, but I couldn't find anything useful for me.</p> <p>In my app I have an image that is converted to NSData and it should be sent to specific URL.</p> <pre><code>url = [NSURL URLWithString:@"http://someHost/internet/index.php"]; dataRequest = [ASIFormDataRequest requestWithURL:url]; NSData *imageData=UIImageJPEGRepresentation(imageToSend,1); [dataRequest setData:imageData withFileName:@"myphoto.jpg" andContentType:@"image/jpeg" forKey:@"file"];[dataRequest startSynchronous]; NSError *error = [dataRequest error]; if (!error) { NSString *response = [dataRequest responseString]; NSLog(@"ResponseCapture: %@",response); } else{ NSLog(@"Error: %@",error); } </code></pre> <p>This is the piece that sends my image. But instead of the above mentiond URL I need to send it to specific URL like this:</p> <p><code>URL – https://&lt;HOST&gt;/grid.dll?HOST&lt;CN&gt;&lt;P_FLAG&gt;&lt;X&gt;&lt;Y&gt;&lt;W&gt;&lt;H&gt;&lt;IMG_ID&gt;&lt;TOKEN&gt;</code></p> <p>HOST – server host. For now just make it configurable by allowing input its value from app.<br> CN – channel number. For now just hardcode it to 123422<br> P_FLAG – 0 if image is full screen image. 1 if image is partial.<br> X –x coordinate of image relative to full image’s (0,0). It should be 4 digits prepended with 0s. If P_FLAG is 0 X should be 0000 as well.<br> Y – y coordinate of image relative to full image’s (0,0). It should be 4 digits prepended with 0s. If P_FLAG is 0 Y should be 0000 as well.<br> W – image width. It should be 4 digits prepended with 0s.<br> H – image height. It should be 4 digits prepended with 0s.<br> IMG_ID – image sequential id from 1 to 9999. After reaching maximum value this id should be resetting to 0. It should be 4 digits prepended with 0s if necessary.<br> TOKEN – session token. For now just make it configurable by allowing input its value from app.<br> But When I want to send POST with this URL it gives bad URL error. </p> <p>The Question is- How to send POST data with this URL. Please Help..</p> <p>Thanks In Advance...</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload