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.
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.
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
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.
- 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.
- 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.
- 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.
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.
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.
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
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
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.
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.
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.
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.
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.
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.
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.
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
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.
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.