public async Task <IActionResult> PostUpsertAsset(string app, DomainId id, UpsertAssetDto request) { var command = request.ToCommand(id, await CheckAssetFileAsync(request.File)); var response = await InvokeCommandAsync(command); return(Ok(response)); }
public async Task <IActionResult> PostAssetTus(string app) { var url = Url.Action(null, new { app, fileId = (object?)null }) !; var(result, file) = await assetTusRunner.InvokeAsync(HttpContext, url); if (file != null) { var command = UpsertAssetDto.ToCommand(file); var response = await InvokeCommandAsync(command); return(CreatedAtAction(nameof(GetAsset), new { app, id = response.Id }, response)); } return(result); }