Add logs for part upload
This commit is contained in:
parent
27aaf98c4d
commit
34ea7749ab
|
@ -187,7 +187,9 @@ class MultiPartUploader {
|
||||||
final isLastPart = i == partsLength - 1;
|
final isLastPart = i == partsLength - 1;
|
||||||
final fileSize =
|
final fileSize =
|
||||||
isLastPart ? encryptedFile.lengthSync() % partSize : partSize;
|
isLastPart ? encryptedFile.lengthSync() % partSize : partSize;
|
||||||
|
_logger.info(
|
||||||
|
"Uploading part ${i + 1} / $partsLength of size $fileSize bytes (total size ${encryptedFile.lengthSync()}).",
|
||||||
|
);
|
||||||
final response = await _s3Dio.put(
|
final response = await _s3Dio.put(
|
||||||
partURL,
|
partURL,
|
||||||
data: encryptedFile.openRead(
|
data: encryptedFile.openRead(
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:collection';
|
import 'dart:collection';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
import "dart:developer" as dev;
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'dart:math' as math;
|
import 'dart:math' as math;
|
||||||
|
|
||||||
|
@ -576,6 +577,7 @@ class FileUploader {
|
||||||
final fileUploadURL = await _getUploadURL();
|
final fileUploadURL = await _getUploadURL();
|
||||||
fileObjectKey = await _putFile(fileUploadURL, encryptedFile);
|
fileObjectKey = await _putFile(fileUploadURL, encryptedFile);
|
||||||
} else {
|
} else {
|
||||||
|
dev.log("Init multipartUpload $multipartEntryExists", name: "Uploader");
|
||||||
if (multipartEntryExists) {
|
if (multipartEntryExists) {
|
||||||
fileObjectKey = await _multiPartUploader.putExistingMultipartFile(
|
fileObjectKey = await _multiPartUploader.putExistingMultipartFile(
|
||||||
encryptedFile,
|
encryptedFile,
|
||||||
|
|
Loading…
Reference in a new issue