Commit Graph
493 Commits
Author SHA1 Message Date
Manuel Raynaud 47e97a5a39 (backend) expose url_preview on item object
We want to distinguish the url and the url_preview. The url_preview
property will be provided only if the mimetype is listed in the
ITEM_PREVIEWABLE_MIME_TYPES settings. Also an other route is added to
nginx forcing the content-disposition with the value attachment for
download url.
2025-09-27 09:47:24 +02:00
Nathan VasseandManuel Raynaud 886651810b (front) add wopi field support for preview
This field is needed in order to make the file previewer open the
wopi editor.
2025-09-26 16:01:23 +02:00
Manuel Raynaud 93a6985ded 🔧(compose) add healthcheck to collabora and onlyoffice
The configure wopi command is ran after the app-dev service is healthy.
To be sure wopi is correctly configured we must ensure both collabora
and onlyoffice are healthy.
2025-09-26 16:01:23 +02:00
Manuel Raynaud 8468bf20a1 🔥(frontend) remove lang addition on wopi launch_url
The launch_url return by the backend application already contains the
lang to use, we only need to use the launch_url without any modification
2025-09-26 16:01:23 +02:00
Manuel Raynaud 166095ab4b (backend) manage placeholders in wopi launch url
Wopi launch url given in the discovery process can have placeholders.
These placeholders are documented in the wopi documentation and we are
able to manage few of them.
https://learn.microsoft.com/en-us/microsoft-365/
cloud-storage-partner-program/online/discovery#placeholder-values
2025-09-26 16:01:16 +02:00
Manuel Raynaud 7669174d5c ♻️(backend) keep only edit action in wopi discovery
The wopi discovery can have multiple time of action. For now, we only
want to keep edit action.
2025-09-26 16:01:16 +02:00
Manuel Raynaud f56c54501a 🔧(compose) add onlyoffice service
We want to use both collabora and onlyoffice. We add onlyoffice in the
compose stack.
2025-09-26 16:01:16 +02:00
Manuel Raynaud 4504f4c43f ♻️(backend) allow wopi edition for creators of non ready items
Not ready items can't be edited. We want to allow creators to start
editing a file while the analyse is on going.
2025-09-26 16:01:16 +02:00
Manuel Raynaud 4535542145 🐛(helm) specify different label for celery components
Celery deployments were using the same component name "backend". The
backend svc was targeting this component name. Time to time, the svc was
sending a request to a celery pod and it was unable to process it.
2025-09-26 16:01:15 +02:00
Manuel Raynaud cee51c1488 (backend) install and configure django_celery_beat
We want to save the celery beat configuration in the database. We can
use for the the app django_celery_beat
2025-09-26 16:01:15 +02:00
Manuel Raynaud 630b512931 🚨(backend) fix test to be compatible with JCOP feature
The jcop feature has introduced lot of changes. it is to hard to report
them in each separate commits. This commit fix them all.
2025-09-26 16:01:15 +02:00
Nathan PanchoutandManuel Raynaud e898a58ecc (front) enhance file preview with error handling and WOPI support
- Added is_wopi_supported property to FilePreviewType for WOPI
integration.
- Implemented ErrorPreview component to handle and display errors during
document loading.
- Updated translations for error messages related to file preview.
- Enhanced EmbeddedExplorerGrid to include WOPI support information.
2025-09-26 16:01:15 +02:00
Nathan PanchoutandManuel Raynaud 513f440760 (front) add WOPI editor and error handling components
- Introduced WopiEditor component for rendering WOPI documents with
dynamic URL handling.
- Added ErrorPreview component to display error messages when WOPI info
retrieval fails.
- Updated preview.scss to include styles for the new components.
- Created WopiEditor.scss and ErrorPreview.scss for specific styling
needs.
2025-09-26 16:01:15 +02:00
Nathan PanchoutandManuel Raynaud f8296f0e88 (front) update user emails and enhance API utility functions
- Refactored API utility functions: introduced getOrigin() to streamline
origin retrieval and updated baseApiUrl() to utilize this new function.
- Added getWopiInfo() method in Driver class and corresponding WopiInfo
type to support WOPI integration.
2025-09-26 16:01:14 +02:00
Manuel Raynaud 9462f7b243 (back) fully compute wopisrc url in the backend
All the info needed to compute the wopisrc url was sent to the front
application and the front application will have to compute it. Instead
of this, everything is made in the back application, the front just have
to use it.
2025-09-26 16:01:14 +02:00
Manuel Raynaud b5e65c482b 🔧(helm) create a job dedicated to run the configure wopi command
A management command trigger the configure wopi task. A job is created
after the deployment if successful.
2025-09-26 16:01:14 +02:00
Manuel Raynaud b58dba21b1 🔧(helm) add celery beat template
We need to deploy a celery beat pod to run scehduled tasks
2025-09-26 16:01:14 +02:00
Manuel Raynaud 644920028d (back) use discovery url to configure wopi
in the wopi protocol, a wopi client should expose a discovery url
allowing the host to configure the url to use based on the extension or
the file mimetype. We use now this discovery url to configure the wopi
host and remove all the existing mechanism made in the settings.
2025-09-26 16:01:14 +02:00
Manuel Raynaud 436de3c0c3 (back) implement the WOPI host rename_file method
The rename file operation allow the user to rename the file using the
wopi client.
2025-09-26 16:01:13 +02:00
Manuel Raynaud 57221b1a3e (back) implement the WOPI host putFile method
The putFile method will allow the WOPI client to save the file modified
by the user.
2025-09-26 16:01:13 +02:00
Manuel Raynaud 5d667a7b54 (back) manage lock operations for wopi host
In order to make modification on the file, the WOPI client manages a
complete lock workflow we have to implement.
2025-09-26 16:01:13 +02:00
Manuel Raynaud bd5530790d (back) implement the WOPI host getFile method
The WOPI client wants to retrieve the file content in order ot use it in
its own application. The documentation related to this method:
https://learn.microsoft.com/en-us/microsoft-365/
cloud-storage-partner-program/rest/files/checkfileinfo
2025-09-26 16:01:06 +02:00
Manuel Raynaud 8c22d2f49f (back) implement the WOPI host CheckFileInfo method
The first method to implement is the CheckFileInfo method. Its
documentation can be consulted with this link:
https://learn.microsoft.com/en-us/microsoft-365/
cloud-storage-partner-program/rest/files/checkfileinfo
2025-09-26 16:00:53 +02:00
Manuel Raynaud 749f7de956 (back) create item endpoint creating a WOPI session
In order to start a WOPI session, we have to fetch an endpoint on the
item viewset returing the access token, the access token ttl and the
wopi client launch url.
2025-09-24 19:31:58 +02:00
Manuel Raynaud 626b965230 (back) service managing wopi access token
In order to start a WOPI lifecycle we have to manage an access token.
This access token will be used by the wopi client to check information
about the file but also doing action like fetching the file content,
saving it etc.
This service is here to generate this access token, manage its lifetime,
manage if the user has access to the item. The info related to the
access token (item and user) are saved in the cache.
2025-09-24 19:31:58 +02:00
Manuel Raynaud 69d1db7436 ♻️(back) move wopi is supported utils to wopi app
The utils determining if an item can be used with the wopi protocol has
beem moved to the wopi application
2025-09-24 19:31:58 +02:00
Manuel Raynaud 40fe1ec814 ♻️(back) update file extension regex to match more files
The file extension regex does not cover all the possible extensions.
Like with number, more than 4 characters, etc.
2025-09-24 19:31:58 +02:00
Manuel Raynaud 3044ff63c9 (back) set in the item serializer if it is wopi compatible
In the serializer we add a is_wopi_supported property indicating if the
current item supports the wopi protocol
2025-09-24 19:31:57 +02:00
Manuel Raynaud 586578d636 ♻️(back) use default storage directly in tests
In tests we were using the S3 client to save file in the bucket. We
don't need to do that, the settings are configured to use the minio
bucket so we can directly use the default storage class for that.
2025-09-24 19:31:57 +02:00
Manuel Raynaud 452c1c6522 (back) create wopi applcation
We want to implement the wopi protocol. We create a django app dedicated
to manage all the wopi protocol implementation. The first thing made is
to set wopi client configuration.
2025-09-24 19:31:57 +02:00
Manuel Raynaud 2cb5b715fd ♻️(front) use PUT method to upload files
We need to adapt the frontend code to use the PUT method to upload a
file instead of the POST method.
The headers used to sign the url must be added to the request sent. For
now the X-ams-acl header is used.
2025-09-24 09:31:17 +02:00
Manuel Raynaud bbbc9c58ee ♻️(helm) adapt tilt deployment to correctly signe presigned urls
We need to correctly configure minio in order to correctly compute the
signature.
2025-09-23 18:00:39 +02:00
Manuel Raynaud e2a2cb1de8 ♻️(backend) use PUT presigned-url to upload files
The file upload to the object storage backend was made using a presigned
post. But not many object storage solution implement this method. They
all used presigned url combined with the put_object method. We choose to
change to this method to be more widely compatible.
2025-09-23 18:00:39 +02:00
Nathan Vasse 74d9cb8eb2 ⬆️(front) upgrade playwright
Upgrade to the latest version for most recent browsers.
2025-09-23 17:40:16 +02:00
Nathan VasseandManuel Raynaud f8d34e0b69 🔖(minor) bump release version 0.5.0
Added

- (backend) search endpoint for ItemViewSet #312
- 🔧(cron) pgdump: fix restic repository #282
- 🔧(backend) support \_FILE for secret environment variables #196
- (front) add search modal #326
- (front) add standalone file preview #337

Changed

- ♻️(tilt) use helm dev-backend chart
- ♻️(front) refactor tree loading #326
- ♻️(front) externalize FilePreview from EmbeddedExplorer + modalify #326

Fixed

- 🐛(front) fix the content when opening the right panel #328
- 🐛(back) encode white spaces in item url #336
v0.5.0
2025-09-22 19:08:16 +02:00
Nathan Vasse 6d740a5747 🔒️(security) mitigate CVE-2025-59375
Fix this CVE by upgrading the frontend's docker image.
2025-09-22 17:31:02 +02:00
Nathan Vasse 94199f0b77 (config) add location block for standalone file previews
Introduce a new location block in both default.conf and
servers.conf.erb to handle requests for standalone file
previews, ensuring proper routing to the corresponding HTML files.
2025-09-22 17:30:53 +02:00
Nathan Vasse 57283ffc30 📝(changelog) add standalone file preview
Update the changelog to reflect the latest changes.
2025-09-16 17:06:17 +02:00
Nathan Vasse 06b4a3783b (front) add e2e tests for standalone file preview
This way we ensure that the feature is tested.
2025-09-16 17:06:17 +02:00
Nathan Vasse d3ca608ef4 (front) add standalone file preview
We were tired of using the raw default previewer of the browser, that
was also triggering downloads instead of preview sometimes.
2025-09-16 16:02:32 +02:00
Nathan Vasse d208033d49 ♻️(front) update copy url to redirect to preview
We need this url to redirect to the frontend specific route.
2025-09-16 16:02:32 +02:00
Nathan Vasse 070b29cad6 (front) add props to FilePreview
In the standalone preview we need to hide the close button and the
nav bar.
2025-09-16 16:02:32 +02:00
Nathan Vasse c96f767822 ️(front) add aria label to more actions button
This is also useful for targeting in e2e tests.
2025-09-16 16:02:32 +02:00
Nathan Vasse ee9534d490 ♻️(front) add itemToPreviewFile util
We will need the same logic on the standalone file previewer.
2025-09-16 15:32:56 +02:00
Manuel RaynaudandNathan Vasse 4ea325424c (backend) introduce scope in search filter
The search filters has now a scope filter. The idea is to filter items
we a defined scope. For now it is limited to items deleted or not.
scope is a MultipleChoice so it can be used multiple time
2025-09-15 17:27:43 +02:00
Manuel RaynaudandNathan Vasse 06db0832b2 (backend) search type filter use also workspace value
In the search filter we want to filter by workspace. It means that if
worspace is the selected value, it should filters on all folders with
depth equal 1. If the selected type is folder, then it should filters on
folders with depth strictly higher than 1.
2025-09-15 17:27:43 +02:00
Nathan Vasse 8c0e70efc1 🐛(front) use up-to-date workspaces in filters
When removing or adding workspaces, the filter was not up-to-date
because it was relying on the query used by the left tree which is
not invalidated.
2025-09-15 17:27:43 +02:00
Nathan Vasse a230315c1d 🐛(front) fix preview file list set to empty
After a search the preview items were set to an array of one item,
so after closing the search modal it was not possible to load preview
items for the current folder. So now we set the list when opening
the preview.
2025-09-15 17:27:43 +02:00
Nathan Vasse c17a2b63af 💄(front) improve file preview access
When using a search modal we want to have a higher opacity for
accessibility reasons.
2025-09-15 17:27:43 +02:00
Nathan Vasse 7fe5bcfe6f 📝(changelog) update changelog
Update it to include the noticable changes from the search
modal PR.
2025-09-15 17:27:43 +02:00