Upload thumbnails first and files next

This commit is contained in:
Vishnu Mohandas 2021-02-25 22:02:49 +05:30
parent a0614ad114
commit 8dee68650e

View file

@ -229,13 +229,13 @@ class FileUploader {
encryptedThumbnailFile
.writeAsBytesSync(encryptedThumbnailData.encryptedData);
final fileUploadURL = await _getUploadURL();
String fileObjectKey = await _putFile(fileUploadURL, encryptedFile);
final thumbnailUploadURL = await _getUploadURL();
String thumbnailObjectKey =
await _putFile(thumbnailUploadURL, encryptedThumbnailFile);
final fileUploadURL = await _getUploadURL();
String fileObjectKey = await _putFile(fileUploadURL, encryptedFile);
// h4ck to fetch location data if missing (thank you Android Q+) lazily only during uploads
if (file.location == null ||
(file.location.latitude == 0 && file.location.longitude == 0)) {