Fix file save process

This commit is contained in:
2025-11-20 10:50:57 +09:00
parent e8ab701f9e
commit 8fdb855d05
3 changed files with 15 additions and 11 deletions

View File

@ -74,8 +74,8 @@
{
var root = args.JsonResponse.RootElement;
var fileToParse = await FileToParseService.AddFileToParseAsync(
root.GetProperty("Path").GetString(),
root.GetProperty("FileName").GetString(),
root.GetProperty("path").GetString(),
root.GetProperty("fileName").GetString(),
UploaderId,
DateTime.Now);
fileToParseId = fileToParse.Id;

View File

@ -110,15 +110,14 @@ namespace Hcs.WebApp.Components.Shared
ShowClose = false
});
var fileToParseId = -1;
if (dialogResult != null && int.TryParse(dialogResult, out fileToParseId))
if (dialogResult != null)
{
ChangeState(SyncedPageState.SyncWaiting);
// TODO: Use user id
var campaign = await HeadquartersService.InitiateCampaignAsync(CampaignType, "", new CampaignParseArgs()
{
FileToParseId = fileToParseId
FileToParseId = (int)dialogResult
});
CampaignManagementState.EnqueueCampaign(campaign);
}