Skip to content

Commit ffce313

Browse files
committed
fix(storage): align credential source ordering for consistency
1 parent 34499f2 commit ffce313

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

apps/sim/lib/uploads/providers/blob/client.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,17 @@ function parseConnectionString(connectionString: string): ParsedCredentials {
4848
* Get account credentials from BLOB_CONFIG, extracting from connection string if necessary.
4949
*/
5050
function getAccountCredentials(): ParsedCredentials {
51+
if (BLOB_CONFIG.connectionString) {
52+
return parseConnectionString(BLOB_CONFIG.connectionString)
53+
}
54+
5155
if (BLOB_CONFIG.accountName && BLOB_CONFIG.accountKey) {
5256
return {
5357
accountName: BLOB_CONFIG.accountName,
5458
accountKey: BLOB_CONFIG.accountKey,
5559
}
5660
}
5761

58-
if (BLOB_CONFIG.connectionString) {
59-
return parseConnectionString(BLOB_CONFIG.connectionString)
60-
}
61-
6262
throw new Error(
6363
'Azure Blob Storage credentials are missing – set AZURE_CONNECTION_STRING or both AZURE_ACCOUNT_NAME and AZURE_ACCOUNT_KEY'
6464
)

0 commit comments

Comments
 (0)