fix: upload folder name
mws-backend / build (push) Successful in 37s
mws-backend / push (push) Successful in 26s
mws-backend / deploy (push) Successful in 13s

This commit is contained in:
2026-09-22 23:17:35 +07:00
parent 9d5e83d3b5
commit 07c3774a88
4 changed files with 13 additions and 10 deletions
@@ -38,11 +38,12 @@ public class UpdateDocumentHandler(IUnitOfWork uow, IMapper mapper, IDocumentCon
if (doc.Type == DocumentType.Document)
{
var projectName = (await uow.Projects.GetByIdAsync(doc.ProjectId, ct))?.Name ?? doc.ProjectId.ToString();
var previousKey = doc.StorageKey;
var bytes = Encoding.UTF8.GetBytes(request.Content ?? "");
using (var ms = new MemoryStream(bytes))
{
doc.StorageKey = await contentStore.UploadAsync(doc.ProjectId, doc.Title, "text/html; charset=utf-8", ms, ct);
doc.StorageKey = await contentStore.UploadAsync(projectName, doc.Title, "text/html; charset=utf-8", ms, ct);
}
if (!string.IsNullOrEmpty(previousKey) && previousKey != doc.StorageKey)