Spaces:
Sleeping
Sleeping
[NOTICKET] Update SAS key
Browse files
externals/storages/azure_blob.py
CHANGED
|
@@ -19,14 +19,9 @@ logger = get_logger("azure-blob")
|
|
| 19 |
|
| 20 |
async def get_blob_service_client() -> BlobServiceClient:
|
| 21 |
try:
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
else:
|
| 26 |
-
credential = AzureSasCredential(AzureBlobConstants.SAS_KEY)
|
| 27 |
-
logger.info(f"β
Initialized Azure AI Cred: Using **Azure Key Credential**")
|
| 28 |
-
# default_credential = DefaultAzureCredential()
|
| 29 |
-
# blob_service_client = BlobServiceClient(url, credential=credential)
|
| 30 |
_blob_service_client = BlobServiceClient(
|
| 31 |
account_url=AzureBlobConstants.ENDPOINT,
|
| 32 |
credential=credential,
|
|
|
|
| 19 |
|
| 20 |
async def get_blob_service_client() -> BlobServiceClient:
|
| 21 |
try:
|
| 22 |
+
credential = AzureSasCredential(AzureBlobConstants.SAS_KEY)
|
| 23 |
+
logger.info(f"β
Initialized Azure AI Cred: Using **Default Credential**")
|
| 24 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
_blob_service_client = BlobServiceClient(
|
| 26 |
account_url=AzureBlobConstants.ENDPOINT,
|
| 27 |
credential=credential,
|
services/uploader/azure_blob_service.py
CHANGED
|
@@ -23,15 +23,9 @@ logger = get_logger("azure blob")
|
|
| 23 |
# --- Environment Variables ---
|
| 24 |
async def get_blob_service_client() -> BlobServiceClient:
|
| 25 |
try:
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
else:
|
| 30 |
-
credential = AzureSasCredential(AzureBlobConstants.SAS_KEY)
|
| 31 |
-
logger.info(f"β
Initialized Azure AI Cred: Using **Azure Key Credential**")
|
| 32 |
-
|
| 33 |
-
# default_credential = DefaultAzureCredential()
|
| 34 |
-
# blob_service_client = BlobServiceClient(url, credential=credential)
|
| 35 |
_blob_service_client = BlobServiceClient(
|
| 36 |
account_url=AzureBlobConstants.ENDPOINT,
|
| 37 |
credential=credential,
|
|
|
|
| 23 |
# --- Environment Variables ---
|
| 24 |
async def get_blob_service_client() -> BlobServiceClient:
|
| 25 |
try:
|
| 26 |
+
credential = AzureSasCredential(AzureBlobConstants.SAS_KEY)
|
| 27 |
+
logger.info(f"β
Initialized Azure AI Cred: Using **Azure Key Credential**")
|
| 28 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
_blob_service_client = BlobServiceClient(
|
| 30 |
account_url=AzureBlobConstants.ENDPOINT,
|
| 31 |
credential=credential,
|