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
private func getFileThumbnail(_ path: String,_ quality: NSNumber,_ position: NSNumber,_ result: FlutterResult) { let fileName = Utility.getFileName(path) let url = Utility.getPathUrl("(Utility.basePath())/(fileName).jpg") Utility.deleteFile(path) if let bitmap = getBitMap(path,quality,position,result) { guard (try? bitmap.write(to: url)) != nil else { return result(FlutterError(code: channelName,message: "getFileThumbnail error",details: "getFileThumbnail error")) } result(Utility.excludeFileProtocol(url.absoluteString)) } // I need to add code to fix it when bitmap is nil: else{ result(FlutterError(code: channelName,message: "getFileThumbnail error",details: "getFileThumbnail error")) } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
private func getFileThumbnail(_ path: String,_ quality: NSNumber,_ position: NSNumber,_ result: FlutterResult) {
let fileName = Utility.getFileName(path)
let url = Utility.getPathUrl("(Utility.basePath())/(fileName).jpg")
Utility.deleteFile(path)
if let bitmap = getBitMap(path,quality,position,result) {
guard (try? bitmap.write(to: url)) != nil else {
return result(FlutterError(code: channelName,message: "getFileThumbnail error",details: "getFileThumbnail error"))
}
result(Utility.excludeFileProtocol(url.absoluteString))
}
// I need to add code to fix it when bitmap is nil:
else{
result(FlutterError(code: channelName,message: "getFileThumbnail error",details: "getFileThumbnail error"))
}
}
The text was updated successfully, but these errors were encountered: