Skip to content

Commit

Permalink
Allow migration of empty binary files (#554)
Browse files Browse the repository at this point in the history
Co-authored-by: Henning Normann <[email protected]>
  • Loading branch information
HenningNormann and Henning Normann authored Nov 19, 2024
1 parent a5a4786 commit e1602bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Storage/Controllers/MigrationController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ public async Task<ActionResult<DataElement>> 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)}",
Expand Down

0 comments on commit e1602bb

Please sign in to comment.