fix: change upload name

This commit is contained in:
2026-09-15 22:23:54 +07:00
parent 4078bf01f4
commit 637ca51f47
11 changed files with 62 additions and 46 deletions
+2 -2
View File
@@ -16,9 +16,9 @@ public class GetDocumentHandler(IUnitOfWork uow, IMapper mapper, IDocumentConten
var doc = await DocumentAccess.GetDocumentForUserAsync(uow, query.UserId, query.DocumentId, ct);
var dto = mapper.Map<DocumentDto>(doc);
if (doc.Type == DocumentType.Document)
if (doc.Type == DocumentType.Document && !string.IsNullOrEmpty(doc.StorageKey))
{
await using var stream = await contentStore.DownloadAsync(doc.ProjectId, doc.Id, ct);
await using var stream = await contentStore.DownloadAsync(doc.StorageKey, ct);
if (stream != Stream.Null)
{
using var reader = new StreamReader(stream, Encoding.UTF8);