avos如何存储查询多张图片


NSData *data; AVFile *imageFile; if (UIImagePNGRepresentation(image) == nil) { data = UIImageJPEGRepresentation(image, 1.0); imageFile = [AVFile fileWithName:@"image.jpg" data:data]; } else { data = UIImagePNGRepresentation(image); imageFile = [AVFile fileWithName:@"image.png" data:data]; } [imageFileCollection addObject:imageFile]; } [testPost addObjectsFromArray:imageFileCollection forKey:@"testImageArray"];

代码如上,在后台看到testimagearray中显示null;求告知存储查询啊

阅读 3.3k
1 个回答

文件应该先 save,在 callback里看到上传成功后再去 addObject:imageFile

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进