From e1602bbc2c52e9adc81d7f6953c50b1a9b949db7 Mon Sep 17 00:00:00 2001 From: HenningNormann Date: Tue, 19 Nov 2024 10:26:47 +0100 Subject: [PATCH] Allow migration of empty binary files (#554) Co-authored-by: Henning Normann --- src/Storage/Controllers/MigrationController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Storage/Controllers/MigrationController.cs b/src/Storage/Controllers/MigrationController.cs index a8b27184..8ab4f826 100644 --- a/src/Storage/Controllers/MigrationController.cs +++ b/src/Storage/Controllers/MigrationController.cs @@ -233,7 +233,7 @@ public async Task> CreateDataElement( (Stream theStream, dataElement.ContentType, dataElement.Filename, _) = await DataElementHelper.GetStream(Request, FormOptions.DefaultMultipartBoundaryLengthLimit); - if (Request.ContentLength > 0) + if (Request.ContentLength > 0 || dataElement.DataType == "binary-data") { (dataElement.Size, _) = await _blobRepository.WriteBlob( $"{(_generalSettings.A2UseTtdAsServiceOwner ? "ttd" : instance.Org)}",