Prompt Studio: Image/document file uploads blocked due to missing ConfirmMultiDoc plugin
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7.2k
- Forks
- 718
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 23
Description
Bug Description
Uploading image files (JPG, PNG, TIFF, BMP, WEBP etc.) or documents in Prompt Studio's "Manage Documents" modal fails with "Only PDF files are allowed" error, despite these formats being officially listed as supported in the documentation.
Root Cause
In frontend/src/components/custom-tools/manage-docs-modal/ManageDocsModal.jsx (around line 608), the beforeUpload function checks if the file type is not in DIRECT_UPLOAD_TYPES. For non-direct types it falls through to:
if (!ConfirmMultiDoc) {
setAlertDetails({
type: "error",
content: "Only PDF files are allowed",
});
}
ConfirmMultiDoc is imported from ../../../plugins/prompt-studio-multi-doc/ConfirmMultiDoc which does not exist in the OSS build, so it is always null. This means all image formats are blocked in the OSS frontend despite the backend supporting them fully.
Impact
All image and document formats listed in the official documentation as supported cannot be uploaded via Prompt Studio in the OSS edition. The restriction is frontend-only. the backend processes these formats correctly when submitted via API.
Expected behavior
Image files should be uploadable in Prompt Studio as documented, or the
error message should accurately reflect OSS limitations rather than
misleadingly saying "Only PDF files are allowed".
Suggested Fix
Either ship the ConfirmMultiDoc component in the OSS build, or add
image MIME types directly to DIRECT_UPLOAD_TYPES in the OSS frontend:
const DIRECT_UPLOAD_TYPES = new Set([
"application/pdf",
"text/plain",
"text/csv",
"application/vnd.ms-excel",
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"application/vnd.ms-excel.sheet.macroenabled.12",
"image/jpeg",
"image/jpg",
"image/png",
"image/bmp",
"image/gif",
"image/tiff",
"image/webp",
]);
Version
latest
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in frontend/src/components/custom-tools/manage-docs-modal/ManageDocsModal.jsx around the beforeUpload function and inspect DIRECT_UPLOAD_TYPES and the missing ConfirmMultiDoc import. Verify the chosen fix allows the documented image and document MIME types in the OSS Prompt Studio modal without incorrectly showing the “Only PDF files are allowed” error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100