Without the secret the request reaches OnlyOffice unsigned and fails
with a cryptic error code -8. Validate in the synchronous path before
creating the placeholder so the API returns an error immediately, and
hide the convert ability from the API so the frontend does not offer
the action.
The backend now reads the secret directly from settings, like it
already does for timeouts.
When OnlyOffice has JWT enabled it adds its own Authorization header to
outgoing file-download requests. The WOPI access token in the query
param must take precedence so the opaque token lookup succeeds.
The OnlyOffice server rejects unsigned /converter requests with error
code -8 when JWT is enabled.
Add a dedicated WOPI_ONLYOFFICE_CONVERT_JWT_SECRET setting and fix the
JWT body token format to match the OnlyOffice conversion API: encode
parameters directly instead of wrapping them in {"payload": …}, and
send only {"token": "…"} in the request body.
Enable JWT on the development OnlyOffice container so the issue is
caught locally.
Titles containing '/' (e.g. "30/03/30 - liste à faire") produced
a file_key with spurious path separators, crashing WOPI on open.
Extract `format_template_filename()` to replace '/' with '-' when
building the filename from a template title.
Closes#626
The dropdown menu test was failing on firefox because
context.grantPermissions does not accept the clipboard-* strings
on that browser. Use the shared helper which skips firefox where
clipboard support is enabled at launch via firefoxUserPrefs.
Cover the folder explorer header on a public folder: authenticated
users see no anonymous CTA; anonymous users see AnonymousCTA with
a login button that redirects to /authenticate/. A third case
exercises the anonymous dropdown menu — copy link writes the
folder URL to the clipboard, and switching language updates the
visible CTA text.
Cover the contextual CTAs on the standalone file preview page:
authenticated users get MyFilesCTA redirecting to /my-files, and
anonymous users get AnonymousCTA with the default "/" try-out
fallback plus a login button that redirects to /authenticate/.
A dedicated case mocks FRONTEND_EXTERNAL_HOME_URL to ensure the
try-out href follows the config.
UserProfile now renders AnonymousCTA along with a dropdown menu
(copy link, language picker) when no user is authenticated, so
visitors on a public page can still act on it without the user
menu. CustomFilesPreview gains a CONTEXTUAL mode that swaps in
the right CTA based on auth state, used by the standalone file
preview page which is now wrapped in GlobalLayout to expose the
auth context.
AnonymousCTA offers a try-out link and a sign-in button to visitors
landing on a public resource. MyFilesCTA is the authenticated
counterpart, sending the user back to their drive. Translations
cover both CTAs and the anonymous dropdown menu that will live next
to them. Components are consumed in a follow-up commit.
The .grist extension was already in FILE_EXTENSIONS_ALLOWED but
upload failed at MIME type validation because python-magic detects
grist files as application/vnd.sqlite3.
The conversion flow crosses modal state, API calls, and explorer refreshes.
Cover the expected user path with a mocked conversion ability and placeholder
response.
The same polling loop fits any transient upload state.
Rename the duplicating poller to a transient one driven by
TRANSIENT_UPLOAD_STATES so converting items are picked up without copying
the hook, and the explorer refreshes automatically when background
conversion finishes.
A converting file is visible but not ready for normal file actions.
Show the transient state consistently and prevent opening or acting on the item
until conversion completes.
Users should understand that opening a legacy file creates an editable copy.
Keep the modal focused on confirmation and let the folder show the ongoing
conversion state.
The frontend needs to treat conversion as item creation rather than job polling.
Return the placeholder item from the driver so UI state stays aligned with the
explorer list.
Uploaded filenames preserve extension case, while WOPI discovery stores
extension keys in lowercase.
Normalize the lookup so legacy files like REPORT.DOC follow the same conversion
path.
Starting a conversion should be quick for the API caller and continue in the
background.
Queue the placeholder-backed conversion task from the item endpoint.
The explorer needs to know when opening a legacy Office file should start
conversion instead of WOPI editing.
Expose the decision on item abilities so the frontend can keep the flow item-
based.
Users need immediate feedback in the current folder while conversion continues
in the background.
Create the target item up front and complete it once converted bytes are
available.
Converted files should appear in the folder immediately while Celery is still
working.
Add a dedicated transient state instead of overloading upload or duplication
states.
OnlyOffice must fetch the source bytes from Drive during server-side conversion.
Use short-lived WOPI access URLs so conversion does not depend on direct object
storage reachability.
Legacy Office formats need an explicit conversion policy before they can be
opened for editing.
Keep the mapping small and configuration-driven so the backend only converts
formats intentionally forced by the WOPI client.
Drive needs a server-side path to convert legacy Office files without opening an
interactive editor session.
Use OnlyOffice's conversion API as the first supported provider for the POC.
Issue #412 asks for a way to download an entire folder. Add a
GET /items/<id>/export/ action that streams a recursive ZIP archive of
the folder, preserving the directory hierarchy and skipping soft-deleted
or not-yet-uploaded descendants.
Introduce a new "export" entry in Item.get_abilities, true only for
folders the user can read. Will be the gate for the upcoming recursive
folder export endpoint.
The _deprecated_numchild and _deprecated_numchild_folder fields were
kept temporarily to preserve the underlying columns during the tree
model transition. The columns are no longer read or written, so the
fields and their columns can now be removed.
When we try to get the VersionId from the s3 response
but this one is not send by the s3 storage (garage for example),
we get a 500 error.
To fix this issue we use the ETag sent by the object storage to track
the version id. This ETag is present also when versionning is not
implemented.
Co-authored-by: RolletQuentin <rolletquen@gmail.com>
Detailed FilePreview behavior is now covered by Playwright CT inside
the ui-kit repo, so the drive e2e suite only keeps integration smoke
checks: upload -> open -> render for PDF, image, video, audio, plus
prev/next navigation across files.
The ui-kit ships a complete FilePreview (PDF, image, video, audio,
WOPI, error/unsupported, navigation, controls), so we drop the in-app
implementation under features/ui/preview/ and keep only a thin
CustomFilesPreview wrapper that maps Item to FilePreviewType, plugs
in the share modal, info sidebar and posthog event.
The WOPI editor is moved to its own features/wopi/ folder and
openWopiInNewTab now takes a FilePreviewType to match the ui-kit
onOpenInEditor callback. The file_preview translation block moves to
the ui-kit too.
The ui-kit now ships FileIcon along with mime-category and icon-set
utilities, so we drop the local catalog (MIME_MAP, KNOWN_EXTENSIONS,
getMimeCategory, getIconByMimeType, FolderIcon, WorkspaceIcon) and
keep only the drive-specific extensions: folders and suspicious
uploads, exposed through getItemExtendedIcon. ItemIcon falls back to
ui-kit FileIcon for everything else.