apiPostFile method
Implementation
Future<dynamic> apiPostFile(String url, File file) async {
if (this.config != null && this.config.host != null) {
debug("apiPostFile URL: ${url}");
var headers = getApiHeaders(isJson: false);
headers["Content-Type"] = "application/octet-stream";
return http.post( Uri.parse(this.config.host + url), body: file.readAsBytesSync(), headers: headers);
} else {
return Future.error(VasatError("No vasat configuration or host found",status: 8000));
}
}