-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[firebase_storage] Impossible to upload multiple files simultaneously? #1935
Comments
Hi @fysoul17 |
No problem @iapicca !
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3) [√] Android Studio (version 3.5) [√] VS Code (version 1.42.1) [√] Connected device (1 available) • No issues found!
version: 1.0.0+1 environment: dependencies: cupertino_icons: ^0.1.2 firebase_core: ^0.4.4+2 dev_dependencies: flutter:
I just used the example project of official firestorage project by replacing firebase to my own one and below code for upload preparation. I also found that the example code also seems to upload sequentially. Just press upload button quickly a few times then watch it. It does not seem to uploading concurrently. List<File> files = List<File>();
for (int index = 1; index <= 4; index++) {
ByteData bytes = await rootBundle.load('assets/image$index.jpg');
List<int> imageData = bytes.buffer.asUint8List();
final Directory systemTempDir = Directory.systemTemp;
final File tempPath = File('${systemTempDir.path}');
String fileName = "${Uuid().v1()}.jpg";
final File orgFile = await File("${tempPath.path}/$fileName").create()
..writeAsBytesSync(imageData);
files.add(orgFile);
}
// This code is at first comment. (just remove codes regarding thumbnail)
uploadAllImages(files); |
@fysoul17 I did a similar test myself, and logged everything out below. As you can see, the log order and timestamps suggest that these uploads are happening simultaneously. Please keep an eye out for a release, and let us know if you're still experiencing the issue
|
Thanks for the information! Just out of curiosity, are files all the same size?? or is the file on index 6 has the largest size? I will test it with the latest version anyway! Thanks again for the comment. |
Given the age of this issue and that there's been no further issue reported after this was tested on the new version of Storage I'm going to go ahead and close this issue. Thanks |
Describe the bug
I was trying to upload 10 image files with under 20KB of file size, and it took around 15~17 seconds every time.
To Reproduce
So I ran a test if it performs upload tasks concurrently as below:
The result shows it performed sequentially like:
So is the StorageUploadTask intended to be performed one-by-one when one task is completed? or is it a bug/coding mistake?
The text was updated successfully, but these errors were encountered: