- 切换了文档保存的回调地址callbackUrl,一直无法调用,查询日志发现http方法不对,改.net api 为HttpPost 后可以进行访问
- onlyoffice 默认日志位置:/var/log/onlyoffice/
.net Core 读取document回调地址传递过来的参数时, 需如下读取:
using (var receiveStream = Request.Body){using (var readStream = new StreamReader(receiveStream)){body = await readStream.ReadToEndAsync();if (string.IsNullOrEmpty(body)){faildString = "{\"error\":1,\"message\":\"Request stream is empty\"}";}}}
.net core 3 之后,需要使用ReadToEndAsync();
打开PPT一直报错,提示文件无法打开,原因:PPT必须有一个页面,不然是0KB无法打开
- wasm streaming compile failed: TypeError: Failed to execute ‘compile’ on ‘We
解决方案:打开nginx config目录下的mime.types文件,在types中添加application/wasm wasm;并且执行 nginx -s reload
- linux时区同步:timedatectl set-timezone Asia/Shanghai :https://www.cnblogs.com/bpzblog/p/13931829.html 更改语言
- postgre时区:https://www.cnblogs.com/liangping/p/7610588.html
onlyoffice 跨域:需配置:ds-docservice.conf nginx.conf —-好像不是必须,需要.Net设置跨域
if ($request_method = 'OPTIONS') { add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; # # 自定义标题和标题各种浏览器*应该*可以,但不是 # add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'; # # 告诉客户这个飞行前信息有效期为20天 # add_header 'Access-Control-Max-Age' 1728000; add_header 'Content-Type' 'text/plain; charset=utf-8'; add_header 'Content-Length' 0; return 204; } if ($request_method = 'POST') { add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'; add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range'; } if ($request_method = 'GET') { add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'; add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range'; }汉化问题:/var/www/onlyoffice/documentserver/web-apps/apps
