qmatteoq / SemanticKernel-Demos

MIT License
66 stars 8 forks source link

Error while uploading pdf file using Blazor UI application #1

Open ajmal-yazdani opened 10 months ago

ajmal-yazdani commented 10 months ago

Hello,

Thanks for sharing the demo.

I am trying to run the Blazor UI Kernel Memory app where I am trying to upload the document.

Question 1. Why I need to keep the document in "Documents" folder inside solution directory?

Question 2. I am getting below error while uploading the doc.:

blazor.web.js:1 Uncaught (in promise) Error: System.InvalidOperationException: An error occurred while reading the remote stream: NotReadableError: The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired.

Please suggest?

qmatteoq commented 9 months ago

Hello @ajmal-yazdani, I apologize for the delay but I missed the notification!

Question 1: the reason is that I'm copying the document into a local folder on the server and then I'm reading the stream. Question 2: let me troubleshoot and see if I can find what's happening.

qmatteoq commented 9 months ago

@ajmal-yazdani can you try with the latest code I've pushed? I changed the location of the file storing from the project folder to the real folder from where the application is running

feffe81 commented 8 months ago

Is this working on windows, too?

The project I programmed gives me "volume not found: default"

And your code gives me: 'Directory not found: mytest.pdf/' So it treats the name as directory although the path argument is

C:\Temp\KernelMemory\bin\Debug\net8.0\Documents\mytest.pdf