[GH-ISSUE #3838] [GUI] PDFs cannot be given to the model on Linux (file dialog hides them, drop opens them only in preview) #1631

Closed
opened 2026-11-04 01:52:46 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @hschepp on GitHub (Oct 23, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3838

Area

[GUI] (the desktop app)

Desktop app, Terminal or source?

Desktop app (Windows, Linux or Mac)

What happened

In the desktop app on Linux there is no way to give a PDF to the model in a chat:

  1. "Add files or photos" file dialog: PDFs (and .txt / .md files) are not shown at all, only pictures, although the input's accept list includes .pdf and the text extensions.
  2. Drag and drop: dropping a PDF onto the chat does not attach it. The PDF opens in the preview pane, and the app says "Photos and PDFs can be opened separately". Only pictures and text files (up to 256 KB) reach the model.

The model itself handles PDFs fine once it gets the text: with a skill that tells it to run pdftotext -layout "<path>" - on a path typed into the message, it reads and answers correctly. So the gap is only in how the app attaches files.

Expected:

  • In step 3, PDFs (and text files) are listed in the dialog and can be selected.
  • In step 4, the PDF is attached so the model can read it: its text extracted, or the file saved in the chat folder and named to the agent.

Actual:

  • In step 3, only pictures are listed. PDFs and text files in the folder are invisible.
  • In step 4, the PDF opens in the preview pane only; the model never sees it.

Likely causes (from reading the app's code, not verified):

  • Dialog: the hidden <input type="file"> uses accept="image/*,.pdf,.txt,.md,…". The dialog shows only pictures, so the WebKitGTK file chooser (libwebkit2gtk-4.1 bundled in the AppImage) appears to apply only the MIME part (image/*) and drop the extension entries. Listing MIME types too (application/pdf, text/plain, text/markdown, …) may fix it on Linux.
  • Drop and attach logic: in the composer's file handler, files matching /\.pdf$/i are routed to the preview (Photos and PDFs can be opened separately) instead of being attached. The server side (chat-uploads.mjs) already saves non-image files under .strata/attachments and names them in the message, so the agent could read them with its tools.

Suggestion: Attach PDFs like other non-image files: save the PDF in the chat folder and name it in the message. The agent can then read it with pdftotext, or Strata could extract the text itself. The preview could stay as a second action.

Workaround: Type the PDF's full path (or part of its file name) into the message and let the agent read it with a skill that runs pdftotext -layout "<path>" -. This works, including paths with spaces and umlauts.

Smallest steps or command that reproduce it

  1. Start the AppImage and load a model.
  2. In a chat, open + → Add files or photos.
  3. Go to a folder that contains PDF files.
  4. Then drag a PDF from the file manager (Nemo) onto the chat window.

Reproduction status

Reproduced locally

Strata version

Strata 0.2.3 · engine 0.1.48 (Strata-0.2.3-linux-nvidia-cuda13.AppImage)

Graphics card, memory and system

RTX 3060 12 GB (driver 595.99.02) · 31 GB RAM · Linux Mint 22.3 (Ubuntu 24.04 base), Cinnamon, X11, kernel 7.0.0

Model, size and settings

Qwen3.8-Flash-Next Gyro-S · 32K context

Logs

No response

Originally created by @hschepp on GitHub (Oct 23, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/3838 ### Area [GUI] (the desktop app) ### Desktop app, Terminal or source? Desktop app (Windows, Linux or Mac) ### What happened In the desktop app on Linux there is no way to give a PDF to the model in a chat: 1. **"Add files or photos" file dialog:** PDFs (and `.txt` / `.md` files) are not shown at all, only pictures, although the input's `accept` list includes `.pdf` and the text extensions. 2. **Drag and drop:** dropping a PDF onto the chat does not attach it. The PDF opens in the preview pane, and the app says "Photos and PDFs can be opened separately". Only pictures and text files (up to 256 KB) reach the model. The model itself handles PDFs fine once it gets the text: with a skill that tells it to run `pdftotext -layout "<path>" -` on a path typed into the message, it reads and answers correctly. So the gap is only in how the app attaches files. **Expected:** - In step 3, PDFs (and text files) are listed in the dialog and can be selected. - In step 4, the PDF is attached so the model can read it: its text extracted, or the file saved in the chat folder and named to the agent. **Actual:** - In step 3, only pictures are listed. PDFs and text files in the folder are invisible. - In step 4, the PDF opens in the preview pane only; the model never sees it. **Likely causes** (from reading the app's code, not verified): - **Dialog:** the hidden `<input type="file">` uses `accept="image/*,.pdf,.txt,.md,…"`. The dialog shows only pictures, so the WebKitGTK file chooser (`libwebkit2gtk-4.1` bundled in the AppImage) appears to apply only the MIME part (`image/*`) and drop the extension entries. Listing MIME types too (`application/pdf`, `text/plain`, `text/markdown`, …) may fix it on Linux. - **Drop and attach logic:** in the composer's file handler, files matching `/\.pdf$/i` are routed to the preview (`Photos and PDFs can be opened separately`) instead of being attached. The server side (`chat-uploads.mjs`) already saves non-image files under `.strata/attachments` and names them in the message, so the agent could read them with its tools. **Suggestion:** Attach PDFs like other non-image files: save the PDF in the chat folder and name it in the message. The agent can then read it with `pdftotext`, or Strata could extract the text itself. The preview could stay as a second action. **Workaround:** Type the PDF's full path (or part of its file name) into the message and let the agent read it with a skill that runs `pdftotext -layout "<path>" -`. This works, including paths with spaces and umlauts. ### Smallest steps or command that reproduce it 1. Start the AppImage and load a model. 2. In a chat, open **+ → Add files or photos**. 3. Go to a folder that contains PDF files. 4. Then drag a PDF from the file manager (Nemo) onto the chat window. ### Reproduction status Reproduced locally ### Strata version Strata 0.2.3 · engine 0.1.48 (Strata-0.2.3-linux-nvidia-cuda13.AppImage) ### Graphics card, memory and system RTX 3060 12 GB (driver 595.99.02) · 31 GB RAM · Linux Mint 22.3 (Ubuntu 24.04 base), Cinnamon, X11, kernel 7.0.0 ### Model, size and settings Qwen3.8-Flash-Next Gyro-S · 32K context ### Logs _No response_
Author
Owner

@github-actions[bot] commented on GitHub (Oct 23, 2026):

Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:

  • Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes".

Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment /reopen.

Details: CONTRIBUTING.md

<!-- gh-comment-id:6365611578 --> @github-actions[bot] commented on GitHub (Oct 23, 2026): Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing: - [ ] Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes". Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment `/reopen`. Details: [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md)
Author
Owner

@github-actions[bot] commented on GitHub (Oct 23, 2026):

Thanks, this follows the format now.

<!-- gh-comment-id:6365681314 --> @github-actions[bot] commented on GitHub (Oct 23, 2026): Thanks, this follows the format now.
Author
Owner

@Niko1221 commented on GitHub (Oct 26, 2026):

Fixed in 0.2.5: PDFs can be attached with the file dialog and by drop on Linux; the app copies them into the chat folder and names them in the message so the model can read them. Please update and tell us if it still opens only the preview.

<!-- gh-comment-id:6423314299 --> @Niko1221 commented on GitHub (Oct 26, 2026): Fixed in 0.2.5: PDFs can be attached with the file dialog and by drop on Linux; the app copies them into the chat folder and names them in the message so the model can read them. Please update and tell us if it still opens only the preview.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#1631
No description provided.