- 我能够从原始上传的文件中下载URL。
- 但是,我无法从由图像调整扩展创建的文件中下载URL。
//making a ref beforehand
const ref = db.collection("impressions").doc().id;
//upload the original file
const bucket = await firebase.storage().ref("impressions/" + ref).put(image);
//this works but I do not need it
const downloadUrl = await firebase.storage().ref("impressions/" + ref).getDownloadURL();
//trying to retrieve the downloadUrl from the files that are most likely still in the process of being created by the image resize extention?
//the ref's are correct
const downloadUrl_image = await firebase.storage().ref("impressions/" + ref + "_1000x1000").getDownloadURL();
const downloadUrl_thumb = await firebase.storage().ref("impressions/" + ref + "_50x50").getDownloadURL();
我怎样可以从调整大小后的图像中获取下载链接?有没有事件可以监听?还是我需要自己编写函数?
感谢您的帮助,
Matthias