{"error":{"code":"errorItemNotFound","message":"Can't find file located at '/data/user/0/com.example.tts/cache/file_picker/wavenet.pdf'.","description":"Operation Failed. Item Not Found.","innerError":{"requestId":null,"date":"2021-12-01T12:54:17.7478679Z"}}}
I am using the group docs parser rest api to extract text from the whole document and i am getting the above error. Here is the code i am using to send the http post request.
Future<String?> getParsedText(File? file) async {
var accessToken = await generateJwt();
// print(accessToken);
var url = Uri.parse('https://api.groupdocs.cloud/v1.0/parser/text');
var body = jsonEncode({
"FileInfo": {
"FilePath": file!.absolute.path,
}
});
var headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer $accessToken',
};
var response = await http.post(url, body: body, headers: headers);
if (response.statusCode == 200) {
print(response.body);
} else {
print(response.body);
print('reason : ${response.reasonPhrase}');
print(response.statusCode);
}
}