File tree Expand file tree Collapse file tree 2 files changed +0
-28
lines changed
Expand file tree Collapse file tree 2 files changed +0
-28
lines changed Original file line number Diff line number Diff line change @@ -247,21 +247,6 @@ export async function uploadWorkspaceFile(
247247 continue
248248 }
249249 logger . error ( `Failed to upload workspace file ${ fileName } :` , error )
250- if (
251- error instanceof Error &&
252- 'code' in error &&
253- ( error as { code ?: string } ) . code === 'AuthorizationFailure'
254- ) {
255- const { getStorageProvider, BLOB_CONFIG } = await import ( '@/lib/uploads/config' )
256- logger . error ( 'Azure storage authorization diagnosis' , {
257- provider : getStorageProvider ( ) ,
258- accountName : BLOB_CONFIG . accountName || '(empty)' ,
259- containerName : BLOB_CONFIG . containerName || '(empty)' ,
260- hasAccountKey : ! ! BLOB_CONFIG . accountKey ,
261- keyLength : BLOB_CONFIG . accountKey ?. length || 0 ,
262- hasConnectionString : ! ! BLOB_CONFIG . connectionString ,
263- } )
264- }
265250 throw new Error (
266251 `Failed to upload file: ${ error instanceof Error ? error . message : 'Unknown error' } `
267252 )
Original file line number Diff line number Diff line change @@ -72,15 +72,8 @@ export async function getBlobServiceClient(): Promise<BlobServiceClientInstance>
7272 const { accountName, accountKey, connectionString } = BLOB_CONFIG
7373
7474 if ( connectionString ) {
75- logger . info ( 'Initializing Azure Blob client using connection string' , {
76- accountName : accountName || '(from connection string)' ,
77- } )
7875 _blobServiceClient = BlobServiceClient . fromConnectionString ( connectionString )
7976 } else if ( accountName && accountKey ) {
80- logger . info ( 'Initializing Azure Blob client using account name and key' , {
81- accountName,
82- keyLength : accountKey . length ,
83- } )
8477 const sharedKeyCredential = new StorageSharedKeyCredential ( accountName , accountKey )
8578 _blobServiceClient = new BlobServiceClient (
8679 `https://${ accountName } .blob.core.windows.net` ,
@@ -138,12 +131,6 @@ export async function uploadToBlob(
138131 const uniqueKey = shouldPreserveKey ? fileName : `${ Date . now ( ) } -${ safeFileName } `
139132
140133 const blobServiceClient = await getBlobServiceClient ( )
141- logger . info ( 'Uploading to Azure Blob Storage' , {
142- containerName : config . containerName ,
143- key : uniqueKey ,
144- contentType,
145- fileSize,
146- } )
147134 const containerClient = blobServiceClient . getContainerClient ( config . containerName )
148135 const blockBlobClient = containerClient . getBlockBlobClient ( uniqueKey )
149136
You can’t perform that action at this time.
0 commit comments