Skip to content

Instantly share code, notes, and snippets.

@Leticia-Carraro
Created September 21, 2021 00:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Leticia-Carraro/e06eeaa0afb789bf3bc470789d94292f to your computer and use it in GitHub Desktop.
Save Leticia-Carraro/e06eeaa0afb789bf3bc470789d94292f to your computer and use it in GitHub Desktop.
Essa função faz o upload dos áudios no bucket
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