We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 122b7b3 commit b67ea33Copy full SHA for b67ea33
App/backend-api/Microsoft.GS.DPS.Host/API/KernelMemory/KernelMemory.cs
@@ -49,6 +49,17 @@ DPS.API.KernelMemory kernelMemory
49
Summary = $"{fileExtension} file is Unsupported file type" });
50
}
51
52
+ // Checking File Size: O byte/kb file not allowed
53
+ if (file == null || file.Length == 0)
54
+ {
55
+ return Results.BadRequest(new DocumentImportedResult()
56
57
+ DocumentId = string.Empty,
58
+ MimeType = contentType,
59
+ Summary = "The file is empty and cannot be uploaded. Please select a valid file."
60
+ });
61
+ }
62
+
63
var result = await kernelMemory.ImportDocument(fileStream, file.FileName, contentType);
64
65
//Return HTTP 202 with Location Header
0 commit comments