Created
September 21, 2021 00:47
-
-
Save Leticia-Carraro/e06eeaa0afb789bf3bc470789d94292f to your computer and use it in GitHub Desktop.
Essa função faz o upload dos áudios no bucket
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def upload_blob(nome_bucket, nome_arquivo_fonte, nome_blob_destino): | |
'''Essa função assume que você já fez a autenticação''' | |
storage_client = storage.Client() | |
bucket = storage_client.get_bucket(nome_bucket) | |
blob = bucket.blob(nome_blob_destino) | |
blob.upload_from_filename(nome_arquivo_fonte) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment