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