Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><strong>XJones</strong>' answer worked like charm.</p> <p>But he didn't mentioned/declared variables <code>_params</code>, <code>BoundaryConstant</code> and <code>requestURL</code>. So, i thought of posting that part as an add-on to his post, so that it may help others in future.</p> <pre><code>// Dictionary that holds post parameters. You can set your post parameters that your server accepts or programmed to accept. NSMutableDictionary* _params = [[NSMutableDictionary alloc] init]; [_params setObject:[NSString stringWithString:@"1.0"] forKey:[NSString stringWithString:@"ver"]]; [_params setObject:[NSString stringWithString:@"en"] forKey:[NSString stringWithString:@"lan"]]; [_params setObject:[NSString stringWithFormat:@"%d", userId] forKey:[NSString stringWithString:@"userId"]]; [_params setObject:[NSString stringWithFormat:@"%@",title] forKey:[NSString stringWithString:@"title"]]; // the boundary string : a random string, that will not repeat in post data, to separate post data fields. NSString *BoundaryConstant = [NSString stringWithString:@"----------V2ymHFg03ehbqgZCaKO6jy"]; // string constant for the post parameter 'file'. My server uses this name: `file`. Your's may differ NSString* FileParamConstant = [NSString stringWithString:@"file"]; // the server url to which the image (or the media) is uploaded. Use your server url here NSURL* requestURL = [NSURL URLWithString:@""]; </code></pre> <p>As i mentioned earler, this is not an answer by itself, just an addon to <strong>XJones'</strong> post.</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