Category : firebase-storage

I am using the code below to upload an image to Firebase storage, which is does successfully but without an access token. How would I add an access token? I have looked on stackoverflow but none of the implementations have worked for me import os from google.cloud import storage os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = ‘C:///file.json’ storage_client = storage.Client() ..

Read more

This code while maybe a little inefficient in places downloads my files from storage. Unfortunately it wont download them to the specific folders I want it to i.e the path provided. Any Ideas? #call down and download all images from firebase users_db = db.collection("users").stream() for doc in users_db: if not os.path.exists(doc.id): os.makedirs(doc.id) username = doc.to_dict()["username"] ..

Read more

When I’m trying to run my code: import pyrebase firebaseConfig = { "apiKey": "xxxxxx", "authDomain": "xxxxxx", "projectId": "xxxxxx", "storageBucket": "xxxxxxx", "serviceAccount": "xxxxxxxxx" } firebase_storage = pyrebase.initialize_app(firebaseConfig) storage = firebase_storage.storage() storage.child("uploads").put("xxxxxxx") I’m getting an error: self.database_url = config["databaseURL"] KeyError: ‘databaseURL’ I don’t know what to do. Can someone help me? Source: Python..

Read more

I am making a security camera app using python and opencv. I have made code for the camera and recording but want to upload it to firebase storage Code: import cv2 import datetime import winsound cam = cv2.VideoCapture(0) fourcc = cv2.VideoWriter_fourcc(*’XVID’) out = cv2.VideoWriter("output.avi", fourcc, 20.0, (640, 480)) while cam.isOpened(): ret, frame1 = cam.read() ret, ..

Read more

I’m trying to download files from my firebase storage with python, and I can’t seem to figure out how. I’ve tried a bunch of different tutorials. So I have the credentials set up as an enviromental path: os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = credentials.json’ and then based off what I’ve seen online, I tried this to donwnload the file ..

Read more

I’m trying to download files from my firebase storage with python, and I can’t seem to figure out how. I’ve tried a bunch of different tutorials. So I have the credentials set up as an enviromental path: os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = credentials.json’ and then based off what I’ve seen online, I tried this to donwnload the file ..

Read more