Do you want to: Suggest a feature / Report a bug / Ask a how-to question
For feature suggestions, describe the result you would like to achieve in detail.
For bug reports, provide the steps to reproduce and if possible a minimal demo of the problem.
Document Server version: 7.4.1.36
Type of installation of the Document Server (docker, deb/rpm, exe, please point us to the installation guide that you used as well):docker
OS:linux
Browser version:Chrome
Additional information:
Any relevant details about the situation. If you’ve modified configuration files or are using a proxy server that might affect the situation, please mention it. You can also attach images and videofile to the post (or to place them to external storage)
How can I monitor the download button on the toolbar? I want to send a notification to a project on my server when the user clicks this button to download a file. I want to record the user’s download behavior. How should I proceed?
Hello @jimboo
First of all, please note that you are using quite outdated version of ONLYOFFICE Docs. I recommend updating to the actual version.
As for the query: information about usage of Download as button is written into the log of DocService in DEBUG level logging. Here is an example:
[2025-01-04T13:20:17.217] [DEBUG] [localhost] [key] [userId] nodeJS - Start downloadAs: {"c":"save","id":"key","userid":"userId","outputformat":65,"title":"Title.docx","nobase64":true,"isSaveAs":false,"saveAsPath":null,"lcid":9,"savetype":3,"saveindex":1,"userconnectionid":"userId"}
[2025-01-04T13:20:17.233] [DEBUG] [localhost] [key] [userId] nodeJS - End downloadAs: {"type":"save","status":"ok","data":"data"}
I believe the only option here us to implement a watcher for such records in logs of Document Server separately that will send specific data to your storage application.
To enable debug-level logging, you need to modify production.json config in /etc/onlyoffice/documentserver/log4js/ directory as such:
"level": "DEBUG"
And then restart services with supervisorctl restart all
for Docker or systemctl restart ds-*
for DEB/RPM packages installation types.