Procházet zdrojové kódy

Fix/file stream azure blob (#6196)

tags/0.6.14
Jyong před 1 rokem
rodič
revize
678ad6b7eb
Žádný účet není propojen s e-mailovou adresou tvůrce revize
1 změnil soubory, kde provedl 2 přidání a 3 odebrání
  1. 2
    3
      api/extensions/storage/azure_storage.py

+ 2
- 3
api/extensions/storage/azure_storage.py Zobrazit soubor

@@ -38,9 +38,8 @@ class AzureStorage(BaseStorage):
def generate(filename: str = filename) -> Generator:
blob = client.get_blob_client(container=self.bucket_name, blob=filename)
blob_data = blob.download_blob()
for chunk in blob_data.chunks():
yield from chunk
return generate()
yield from blob_data.chunks()
return generate(filename)

def download(self, filename, target_filepath):
client = self._sync_client()

Načítá se…
Zrušit
Uložit