File tree 1 file changed +6
-5
lines changed 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -77,23 +77,24 @@ class DartdocBackend {
77
77
.where ((fse) => fse is File )
78
78
.map ((fse) => fse as File );
79
79
80
+ int count = 0 ;
80
81
Future upload (File file) async {
81
82
final relativePath = p.relative (file.path, from: dir.path);
82
83
final objectName = entry.objectName (relativePath);
83
84
final isShared = storage_path.isSharedAsset (relativePath);
84
85
if (isShared) {
85
86
final info = await getFileInfo (entry, relativePath);
86
- if (info != null ) {
87
- _logger.fine ('$objectName has been already uploaded.' );
88
- return ;
89
- }
87
+ if (info != null ) return ;
90
88
}
91
- _logger.fine ('Uploading to $objectName ...' );
92
89
try {
93
90
final sink =
94
91
_storage.write (objectName, contentType: contentType (objectName));
95
92
await sink.addStream (file.openRead ());
96
93
await sink.close ();
94
+ count++ ;
95
+ if (count % 100 == 0 ) {
96
+ _logger.info ('Upload completed: $objectName (item #$count )' );
97
+ }
97
98
} catch (e, st) {
98
99
_logger.severe ('Upload to $objectName failed with $e ' , st);
99
100
rethrow ;
You can’t perform that action at this time.
0 commit comments