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

原文地址:https://www.cnblogs.com/cocoajin/p/3491464.html