/**
* Returns a reference for the given path in the default bucket.
* @param path A relative path to initialize the reference with,
* for example `path/to/image.jpg`. If not passed, the returned reference
* points to the bucket root.
* @return A reference for the given path.
*/
ref(path?: string): firebase.storage.Reference;
2条答案
按热度按时间vh0rcniy1#
我有几乎相同的代码,但是当我创建引用时,我将路径作为参数传递。否则,默认情况下指向根桶,因此出现异常。
尝试将第一行更改为:
从文档中:
piah890a2#
你也可以试试