我正在尝试下载我上传到Firebase的图像
我将下载网址作为httpPath传递。但是E/StorageException(16586): StorageException has occurred.
E/StorageException(16586): Object does not exist at location.
E/StorageException(16586): Code: -13010 HttpResult: 404
E/StorageException(16586): StorageException has occurred.
E/StorageException(16586): Object does not exist at location.
Future<Null>downloadFile(String httpPath) async{
final Directory appDir = await getApplicationDocumentsDirectory();
final appDirPath = appDir.path;
final RegExp regExp = RegExp('([^?/]*\.(jpg))');
final filename = regExp.stringMatch(httpPath);
final File thefile = File('${appDirPath}/$filename');
final StorageReference sref = FirebaseStorage.instance.ref().child('storeFolderName').child(filename);
final StorageFileDownloadTask fileDownloadTask = sref.writeToFile(thefile);
final int byteNumber = (await fileDownloadTask.future).totalByteCount;
print('your file byte number is : $byteNumber');
}