fix backup upload

This commit is contained in:
Anton Suhorukov 2023-08-28 12:01:36 +03:00
parent 9c8ee8cbbc
commit d475451899
2 changed files with 7 additions and 3 deletions

View File

@ -22,8 +22,8 @@
//
// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
namespace ASC.Web.Studio.Core.Backup;
public class BackupFileUploadHandler
@ -112,7 +112,10 @@ public class BackupFileUploadHandler
result = Error(error.Message);
}
await context.Response.WriteAsync(System.Text.Json.JsonSerializer.Serialize(result));
await context.Response.WriteAsync(System.Text.Json.JsonSerializer.Serialize(result, new System.Text.Json.JsonSerializerOptions()
{
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingDefault
}));
}
private BackupFileUploadResult Success(int chunk = 0, bool endUpload = false)

View File

@ -36,6 +36,7 @@ global using ASC.Data.Backup.Contracts;
global using ASC.Data.Backup.Core.IntegrationEvents.Events;
global using ASC.Data.Backup.EF.Context;
global using ASC.Data.Backup.Extension;
global using System.Text.Json.Serialization;
global using ASC.Data.Backup.Services;
global using ASC.EventBus.Abstractions;
global using ASC.Files.Core.EF;