You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow downloading files in read-only iframe embeds #307
When opening a document in a read-only iframe, download controls remain available and generate a file, but no download starts. This gives the impression that the controls are malfunctioning.
Steps to reproduce
Open a document inside an iframe using /editor?src=<document-url>&readonly=1&embed=1.
Select a download/export option in the File tab.
Observe that no file is downloaded, although the console reports:
Read-only mode should allow downloading without enabling editing:
Keep download controls functional when downloading is permitted.
Allow downloading to be configured independently of editing permissions.
Hide or visibly disable download controls when downloading is unavailable.
Implementation context
In lib/onlyoffice/save-stream.ts, routeSavedFile() skips local downloads in embed mode and recommends using document:save from the parent page. However, requestSaveDocument() rejects that command when the document is read-only.
Removing embed=1 does not change this behavior because lib/embed-mode.ts automatically detects iframe embedding.
Could downloading be supported independently of editing in read-only embeds? Allowing local downloads through an explicit option, or providing an API command that permits exporting a read-only document, would both address the issue.
Read-only no longer blocks export: document:save / requestSaveDocument work on locked documents (edit stays off).
In embed mode, if the parent does not claim the File-tab download via document:save, the bytes are downloaded locally instead of being dropped (and the host dirty flag is left alone).
So with /editor?src=…&readonly=1&embed=1, File → Download should produce a real file again. Parent pages can still use document:save when they want the File themselves.
Sorry for the confusing “controls work but nothing happens” behavior — appreciate you writing it up so precisely.
Activity
fix(save): allow export from read-only embed iframes
chaxus commentedon Nov 6, 2026
Thanks for the clear report and the pointer into
routeSavedFile/requestSaveDocument— that was exactly the double bind.Fixed in #308 and live on https://edit.chaxus.com/
What changed:
document:save/requestSaveDocumentwork on locked documents (edit stays off).document:save, the bytes are downloaded locally instead of being dropped (and the host dirty flag is left alone).So with
/editor?src=…&readonly=1&embed=1, File → Download should produce a real file again. Parent pages can still usedocument:savewhen they want theFilethemselves.Sorry for the confusing “controls work but nothing happens” behavior — appreciate you writing it up so precisely.