We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please fill in the detailed description of the issue (full output of any stack trace, compiler error, ...) and the steps to reproduce the issue.
ZLPhotoBrowser version: e.g. 4.2.1 Device: e.g. iPhone X Device version: e.g. iOS 15.0 Xcode version: e.g. Xcode 13.2
ZLPhotoConfiguration
Paste your code here.
Error loading image : Error Domain=NSCocoaErrorDomain Code=260 "未能打开文件“IMG_4557.PNG”,因为它不存在。" UserInfo={NSFilePath=/var/mobile/Media/DCIM/104APPLE/IMG_4557.PNG, NSUnderlyingError=0x114c41b80 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
The text was updated successfully, but these errors were encountered:
@longitachi 有一些图片选择了之后打不开,具体方法在下面,这个函数返回的路径,用try Data(contentsOf: url)获取图片数据时会报错,提示路径不存在,麻烦帮忙看一下。 @objc public class func fetchAssetFilePath(asset: PHAsset, completion: @escaping (String?) -> Void) { asset.requestContentEditingInput(with: nil) { (input, info) in var path = input?.fullSizeImageURL?.absoluteString if path == nil, let dir = asset.value(forKey: "directory") as? String, let name = asset.value(forKey: "filename") as? String { path = String(format: "file:///var/mobile/Media/%@/%@", dir, name) } completion(path) } }
@objc public class func fetchAssetFilePath(asset: PHAsset, completion: @escaping (String?) -> Void) { asset.requestContentEditingInput(with: nil) { (input, info) in var path = input?.fullSizeImageURL?.absoluteString if path == nil, let dir = asset.value(forKey: "directory") as? String, let name = asset.value(forKey: "filename") as? String { path = String(format: "file:///var/mobile/Media/%@/%@", dir, name) } completion(path) } }
Sorry, something went wrong.
虽然提供了这个获取路径的方法,但是一直没试过,iOS15之前通过这种方法能读取到data吗?我刚用14.1模拟器试了下也不行
No branches or pull requests
Issue Description
Description and Steps
Please fill in the detailed description of the issue (full output of any stack trace, compiler error, ...) and the steps to reproduce the issue.
Info
ZLPhotoBrowser version: e.g. 4.2.1
Device: e.g. iPhone X
Device version: e.g. iOS 15.0
Xcode version: e.g. Xcode 13.2
Configuration code of
ZLPhotoConfiguration
Error loading image : Error Domain=NSCocoaErrorDomain Code=260 "未能打开文件“IMG_4557.PNG”,因为它不存在。" UserInfo={NSFilePath=/var/mobile/Media/DCIM/104APPLE/IMG_4557.PNG, NSUnderlyingError=0x114c41b80 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
The text was updated successfully, but these errors were encountered: