Prompt Studio: Image/document file uploads blocked due to missing ConfirmMultiDoc plugin
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 76/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 技術スタック
- javascript
- 領域
- frontend
調査の方向性
frontend/src/components/custom-tools/manage-docs-modal/ManageDocsModal.jsx の beforeUpload 関数付近から始め、DIRECT_UPLOAD_TYPES と不足している ConfirmMultiDoc の import を確認します。選択した修正によって、OSS Prompt Studio モーダルでドキュメントに記載された画像およびドキュメントの MIME タイプが許可され、「Only PDF files are allowed」エラーが誤って表示されないことを検証してください。
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- Python
- スター
- 7.2k
- フォーク
- 718
- 平均マージ
- 3日 1時間
- マージ済み PR(30日)
- 23
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Zipstack/unstract のほかの issue
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 25/100
Zipstack/unstract の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100