[GH-ISSUE #8] 关于修订模式 #9

Closed
opened 2026-02-25 22:30:44 +03:00 by kerem · 3 comments
Owner

Originally created by @FCIron on GitHub (Mar 8, 2019).
Original GitHub issue: https://github.com/marx-yu/WopiHost/issues/8

大神我想一下wopi协议支持在线编辑的时候默认以没修订模式打开吗

Originally created by @FCIron on GitHub (Mar 8, 2019). Original GitHub issue: https://github.com/marx-yu/WopiHost/issues/8 大神我想一下wopi协议支持在线编辑的时候默认以没修订模式打开吗
kerem closed this issue 2026-02-25 22:30:44 +03:00
Author
Owner

@ethendev commented on GitHub (Oct 23, 2019):

@kphungry

你需要添加一个处理 Look 相关的接口,我这里没有相应环境了,无法测试,所以需要你自己测试一下。
接口定义如下:

GetLock API

POST /wopi/files/{file_id}

Request Headers
X-WOPI-Override  --值为 `GET_LOCK`.

Office Headers 返回值如下:
Response Headers
X-WOPI-Lock                         --标识文件当前锁的字符串值。与其他锁操作不同。
X-WOPI-LockFailureReason   --指示锁失败原因的可选字符串值。

Lock API

POST /wopi/files/{file_id}

Request Headers
X-WOPI-Override   --值为 `LOCK`.
X-WOPI-Lock         --上一步得到的值

Office Headers 返回值如下:
Response Headers
X-WOPI-Lock     – 标识文件当前锁的字符串值。与其他锁操作不同。
X-WOPI-LockFailureReason   – 指示锁失败原因的可选字符串值。

Unlock API

POST /wopi/files/{file_id}

Request Headers
X-WOPI-Override   --值为 `UNLOCK`.
X-WOPI-Lock         --上一步得到的值

Office Headers 返回值如下:
Response Headers
X-WOPI-Lock     – 标识文件当前锁的字符串值。与其他锁操作不同。
X-WOPI-LockFailureReason   – 指示锁失败原因的可选字符串值。
<!-- gh-comment-id:545324017 --> @ethendev commented on GitHub (Oct 23, 2019): @kphungry 你需要添加一个处理 Look 相关的接口,我这里没有相应环境了,无法测试,所以需要你自己测试一下。 接口定义如下: GetLock API ``` POST /wopi/files/{file_id} Request Headers X-WOPI-Override --值为 `GET_LOCK`. Office Headers 返回值如下: Response Headers X-WOPI-Lock --标识文件当前锁的字符串值。与其他锁操作不同。 X-WOPI-LockFailureReason --指示锁失败原因的可选字符串值。 ``` Lock API ``` POST /wopi/files/{file_id} Request Headers X-WOPI-Override --值为 `LOCK`. X-WOPI-Lock --上一步得到的值 Office Headers 返回值如下: Response Headers X-WOPI-Lock – 标识文件当前锁的字符串值。与其他锁操作不同。 X-WOPI-LockFailureReason – 指示锁失败原因的可选字符串值。 ``` Unlock API ``` POST /wopi/files/{file_id} Request Headers X-WOPI-Override --值为 `UNLOCK`. X-WOPI-Lock --上一步得到的值 Office Headers 返回值如下: Response Headers X-WOPI-Lock – 标识文件当前锁的字符串值。与其他锁操作不同。 X-WOPI-LockFailureReason – 指示锁失败原因的可选字符串值。 ```
Author
Owner

@kphungry commented on GitHub (Oct 27, 2019):

感谢你的回复,我再多试试

<!-- gh-comment-id:546679928 --> @kphungry commented on GitHub (Oct 27, 2019): 感谢你的回复,我再多试试
Author
Owner

@ethendev commented on GitHub (Oct 28, 2019):

@kphungry
在最新的代码中我已经添加了lock,但是 word 文档因为office自身原因在编辑保存时不能通过 lock 判断操作权限,代码中有说明。
有需要的话可以参考下。

<!-- gh-comment-id:546962436 --> @ethendev commented on GitHub (Oct 28, 2019): @kphungry 在最新的代码中我已经添加了lock,但是 word 文档因为office自身原因在编辑保存时不能通过 lock 判断操作权限,代码中有说明。 有需要的话可以参考下。
kerem changed title from [GH-ISSUE #8] 不支持lock和unlock,如何处理多人同时编辑的场景呢? to [GH-ISSUE #8] 关于修订模式 2026-03-01 18:30:39 +03:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/wopihost#9
No description provided.