azure-search-openai-demo icon indicating copy to clipboard operation
azure-search-openai-demo copied to clipboard

Documents in Blob Storage Subfolders Do Not Open in PDF Viewer

Open UAQureshi opened this issue 10 months ago • 3 comments

Image

When uploading documents to Azure Blob Storage using a folder prefix (e.g., myfolder/document_Test.pdf), the PDF viewer fails to open the file. The error message returned is:

Not Found The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

Additionally, the Search results for these documents show fields like:

"imageEmbedding": null, "category": null, "sourcepage": "document_Test.pdf", "sourcefile": null, "oids": [], "groups": []

Steps to reproduce: 1. Upload a PDF file to a Blob Storage container content, placing it in a subfolder (e.g., myfolder/document_Test.pdf). 2. Ask a question and Access the citation link to veiw PDF through the application’s PDF viewer. 3. Observe the “Not Found” error.

UAQureshi avatar Feb 13 '25 17:02 UAQureshi

You're right, we do not have explicit handling of subfolders. For now, I would either:

  1. upload everything to the root folder
  2. Modify the code to include the folder in sourcepage (and adjust citation formats as needed)
  3. Store the folder name in category, and use that to construct the URL

Keep in mind the situation where two documents in two folders have same filename, and make sure your code accounts for that.

pamelafox avatar Feb 19 '25 20:02 pamelafox

This would be of value for me as well +1 :-)

cforce avatar Feb 20 '25 10:02 cforce

yes would be a great addition if subfolders would also work!

Bennzn avatar Feb 28 '25 07:02 Bennzn