最近推出的Firebase扩展程序“Image resize”在图片上传到存储桶后会生成缩略图。扩展完成后,我如何获取此缩略图的下载URL?
final StorageReference storageRef =
FirebaseStorage.instance.ref().child(fileName);
final StorageUploadTask uploadTask = storageRef.putFile(
File(path),
);
final StorageTaskSnapshot downloadUrl = (await uploadTask.onComplete);
final String url = (await downloadUrl.ref.getDownloadURL()); //This will give me the download url of file before resize
// ??How do I the download url of resized image that gets stored in fileName/thumbnails folder
downloadURL = await ref.getDownloadURL()
时,文件将不存在。需要在创建缩略图之后获取下载链接。猜想我们需要另一个云函数来实现这一点。 - Vinayakaram Nagarajan