修改firebase的bucket地址
parent
c3a5f4c24a
commit
db6850dd21
|
|
@ -48,7 +48,7 @@ class FirebaseHelper:
|
||||||
self.init_storage(self.config["project_id"])
|
self.init_storage(self.config["project_id"])
|
||||||
|
|
||||||
def init_firebase(self, project_id):
|
def init_firebase(self, project_id):
|
||||||
storage_bucket = "gs://" + project_id + ".appspot.com"
|
storage_bucket = "gs://" + project_id + ".firebasestorage.app"
|
||||||
databaseURL = "https://" + project_id + ".firebaseio.com/"
|
databaseURL = "https://" + project_id + ".firebaseio.com/"
|
||||||
cred = credentials.Certificate(GOOGLE_SERVER_FILE)
|
cred = credentials.Certificate(GOOGLE_SERVER_FILE)
|
||||||
self.firebase_app = firebase_admin.initialize_app(cred, {
|
self.firebase_app = firebase_admin.initialize_app(cred, {
|
||||||
|
|
@ -60,7 +60,7 @@ class FirebaseHelper:
|
||||||
print("初始 firebase 成功")
|
print("初始 firebase 成功")
|
||||||
|
|
||||||
def init_storage(self, project_id):
|
def init_storage(self, project_id):
|
||||||
bucket = project_id + ".appspot.com"
|
bucket = project_id + ".firebasestorage.app"
|
||||||
if self.firebase_app:
|
if self.firebase_app:
|
||||||
self.storage_instance = storage.bucket(name=bucket, app=self.firebase_app)
|
self.storage_instance = storage.bucket(name=bucket, app=self.firebase_app)
|
||||||
print("初始 storage 成功")
|
print("初始 storage 成功")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue