Open chrisvoronin opened 4 years ago
something along those lines fixes it: I fixed it in my Form, with access I can push PR here.
if url.isFileURL {
let local = LocalFileImageDataProvider(fileURL: url)
AXDispatchUtils.executeInBackground { [weak self] in
local.data(handler: { (result) in
switch result {
case .failure(let error):
AXDispatchUtils.executeInBackground { [weak self] in
guard let self = self else { return }
self.delegate?.networkIntegration(self, loadDidFailWith: error, for: photo)
}
case .success(let imageData):
let image = UIImage(data: imageData)
photo.image = image
AXDispatchUtils.executeInBackground { [weak self] in
guard let self = self else { return }
self.delegate?.networkIntegration(self, loadDidFinishWith: photo)
}
}
})
}
return
}
@chrisvoronin - thanks for the investigation! If you want contribute, you can fork the repo and then open a PR upstream.
Described here: https://help.github.com/en/articles/creating-a-pull-request-from-a-fork
KingFisher integration does not work with local files.
KF Integration source uses: KingfisherManager.shared.retrieveImage However that does not use LocalFileProvider (king fisher) to load them which is needed for local files.