iOS文件上传文件URL错误Invalid parameter not satisfying: fileURL'

一:iOS文件上传提示URL错误 Invalid parameter not satisfying: fileURL'

二:解决方法:

NSString *imagePath = [[NSBundle mainBundle] pathForResource:@"wallpaper" ofType:@"jpg"];
NSURL* imageURL = [NSURL fileURLWithPath:imagePath isDirectory:NO];

  注意:FileUrl 要调用 NSURL的  file 开头的类方法;

 

参考http://stackoverflow.com/questions/9858858/unable-to-change-desktop-image-because-url-is-not-file-url

posted @ 2013-12-25 22:06  cocoajin  阅读(2796)  评论(0编辑  收藏  举报