uploadTextData method
Future<T>
uploadTextData(
- String memberMediumDocumentId,
- String textData,
- String baseName, {
- FeedbackProgress? feedbackProgress,
Implementation
Future<T> uploadTextData(
String memberMediumDocumentId, String textData, String baseName,
{FeedbackProgress? feedbackProgress}) async {
List<int> list = textData.codeUnits;
Uint8List fileData = Uint8List.fromList(list);
// First, upload the file
var fileInfo = await UploadInfo.uploadData(baseName, fileData,
app.documentID, ownerId, packageName, readAccessCustomMetaData(),
feedbackProgress: (progress) => _feedBackAggregatedProgress(
1, 2, progress,
feedbackProgress: feedbackProgress));
if (fileInfo == null) {
throw Exception('fileInfo is null');
}
var returnMe = await textToMediumModel(
memberMediumDocumentId,
baseName,
fileInfo,
);
_feedBackAggregatedProgress(2, 2, 1, feedbackProgress: feedbackProgress);
return returnMe;
}