Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions Rock/Storage/Provider/AzureBlobStorage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,23 @@ The exception was being thrown by the second call to BlobClient.Upload() when re
Reason: Wide SMS image attachments stored in Azure cause exceptions in Communication Wizard.
https://github.com/SparkDevNetwork/Rock/issues/5719
*/
blobClient.Upload( binaryFile.ContentStream, overwrite: true );
/*
9/28/2026 - SL (SECC)

fileSize = binaryFile.ContentStream.Length;
Dispose the content stream after uploading so this provider follows the same
contract as the Database and FileSystem providers. Callers such as
SignatureDocumentTemplateService.UpdateDocumentStatus assign a FileStream to
ContentStream, save, then File.Delete() the temp file; leaving the stream open
leaked the file handle and caused the delete to throw IOException.

Reason: ROCK-9041 Process Signature Documents job fails with file lock on Azure provider.
*/
using ( var stream = binaryFile.ContentStream )
{
blobClient.Upload( stream, overwrite: true );

fileSize = stream.Length;
}
}

/// <summary>
Expand Down
Loading