❶ Ios图片上传java怎么接收!
用file类型接收, 在这看你用的什么框架 和HTML接收没有任何去别 !
❷ IOS上传图片,将NSData提交给PHP接口
上传的是图片,你用文字编辑器打开当然不行!
你想传给PHP接口,有两种途径:
将上传图片的路径传过去
将图片的base 64编码传过去
❸ 苹果手机图片怎么上传到电脑
❹ iOS怎么在后台上传相册照片
可以通过XY苹果助手进行导入 或者 导出 很方便//
❺ 将iphone照片导入ios电脑上吗
在电脑上下载一个苹果助手,连接手机,在电脑苹果助手里选择手机上上传的照片就好了。
❻ ios5 照片流 怎么上传到电脑
貌似你直接存进去就可以了,然后打开电脑找到云空间,照片流就看到了,不用同步!!相当与一个云存储,只要登陆帐号就可以进入你的存储空间,不管那里登陆都是一样的!!希望对你有帮助,谢谢
❼ ios用asi怎么上传系统相册照片
1.新建一个single view工程,导入ASIHttpRequest库,导入MobileCoreServices、CFNetwork、SystemConfiguration和libz1.2.5.dylib四个系统库
2.随便导入一张图片,比如haoyou.png
3.ViewController.h
#import <uikit uikit.h="">
#import "ASIHTTPRequest.h"
#import "ASIFormDataRequest.h"
@interface ViewController : UIViewController
@property (nonatomic, )NSString *m_auth;
@end</asihttprequestdelegate></uikit>
4.ViewController.m 添加两个按钮
(void)viewDidLoad {
[super viewDidLoad];
UIButton *loginBtn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
loginBtn.frame = CGRectMake(100, 20, 120, 40);
[loginBtn setTitle:@"登录" forState:UIControlStateNormal];
[loginBtn addTarget:self action:@selector(login) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:loginBtn];
UIButton *uploadBtn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
uploadBtn.frame = CGRectMake(100, 80, 120, 40);
[uploadBtn setTitle:@"上传" forState:UIControlStateNormal];
[uploadBtn addTarget:self action:@selector(upload) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:uploadBtn];
}
5.实现login和upload两个方法
- (void)login {
NSURL *url = [NSURL URLWithString:@"..."];//此处省略请求url
//请求
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
request.tag = 10;
request.delegate = self;
[request startAsynchronous];
}
- (void)upload {
NSURL* url = [NSURL URLWithString:@"..."];//此处省略请求url
UIImage* img = [UIImage imageNamed:@"haoyou.png"];
NSData* data = UIImagePNGRepresentation(img);
//ASIFormDataRequest请求是post请求,可以查看其源码
ASIFormDataRequest* request = [ASIFormDataRequest requestWithURL:url];
request.tag = 20;
request.delegate = self;
[request setPostValue:self.m_auth forKey:@"m_auth"];
// [request setFile:@"tabbar.png" forKey:@"haoyou"];//如果有路径,上传文件
[request setData:data withFileName:@"tmp.png" andContentType:@"image/png" forKey:@"headimage"];
// 数据 文件名,随便起 文件类型 设置key
[request startAsynchronous];
}
6.实现协议
- (void)requestFailed:(ASIHTTPRequest *)request {
NSLog(@"请求失败");
}
- (void)requestFinished:(ASIHTTPRequest *)request {
if (request.tag == 10) {
NSDictionary * dic = [NSJSONSerialization JSONObjectWithData:request.responseData options:0 error:nil];
self.m_auth = [dic objectForKey:@"m_auth"];
NSLog(@"%@", self.m_auth);
}
if (request.tag == 20) {
NSLog(@"%@", request.responseString);
}
}