📌  相关文章
📜  火力基地! [W] undefined:undefined - 规则集使用旧版本(版本 [1]).请更新到最新版本(版本 [2]). - 无论代码示例

📅  最后修改于: 2022-03-11 15:00:52.154000             🧑  作者: Mango

代码示例1
service firebase.storage {
    match /b/{bucket}/o {
        match /user-files/{uid}/{allPaths=**} {
            allow read: if resource.metadata[request.auth.uid] == "1";  // the uploading user can get a downloadURL
            allow create, update: if request.auth.uid == uid // User can only upload to the users own folder
                && request.auth.token.storageLeft >= request.resource.size
                && request.auth.token.path == request.resource.name
            allow delete: if false; // files are only deleted by cloud functions
        }
    }
}