Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF upload fails with spaces in filename #452

Open
ystoneman opened this issue Apr 14, 2024 · 2 comments
Open

PDF upload fails with spaces in filename #452

ystoneman opened this issue Apr 14, 2024 · 2 comments

Comments

@ystoneman
Copy link

I tried uploading a PDF with spaces in the name ("Executive Order on the Safe, Secure, and Trustworthy Development and Use of Artificial Intelligence _ The White House.pdf") using the Chatbot's UI. This failed, and the UI showed me a generic error ("Uploading files Upload failed"). Chrome's dev tools showed me it was an S3/CloudFront issue:

"Failed to load resource: the server responded with a status of 403 (Forbidden)."
Screenshot 2024-04-14 at 4 46 00 PM

Replacing the spaces with underscores in the name ("Executive_order_AI.pdf") made the error go away and the file upload.

To improve UX I would either:

  1. Improve the UI's error message to tell users that the filename contains invalid characters (like spaces) and tells them the filename requirements.
  2. Or even better, automatically normalize the filename before upload by replacing spaces with underscores, truncating if needed, and applying other necessary transformations for S3 compatibility.
@azaylamba
Copy link
Contributor

Actually, the issue is not with using spaces, the issue is with having comma(,) in the file name.

@azaylamba
Copy link
Contributor

This can be closed now as the fix has been merged to main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants