uploadByteData method
Uploads a file contained by a ByteData object, returns true if successful.
Implementation
Future<bool> uploadByteData(ByteData byteData) async {
var stream = http.ByteStream.fromBytes(byteData.buffer.asUint8List());
return upload(stream, byteData.lengthInBytes);
}