fix: upload folder name
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user