小编Ish*_*ari的帖子

如何在iOS上将图像作为JSON从库上传到服务器

如何从iPhone上的库中将图像作为JSON上传到服务器?我尝试了以下方法:

[Loading startLoading:YES];
NSString *urlString = [NSString stringWithFormat:@"http://railsboxtech.com/singing/jsn_song/register_response.php?accesstoken=%@",Access_Token];
//username, password, name, email, country
NSString *parameter = [NSString stringWithFormat:@"username=%@&password=%@&fname=%@&email=%@&lname=%@&btnImage4=%@",userField.text,passField.text,fnameField.text,emailField.text,lnameField.text,btnImage4];
NSConnection *conn = [[NSConnection alloc] initWithDelegate:self];
[conn sendRequest:urlString withParaMeter:parameter withMethod:@"POST" withTag:1];
[conn startAsynchronousRequest];
Run Code Online (Sandbox Code Playgroud)

iphone json ios

3
推荐指数
1
解决办法
6668
查看次数

标签 统计

ios ×1

iphone ×1

json ×1