mirror of
https://github.com/ethendev/wopihost.git
synced 2026-04-25 13:55:49 +03:00
[GH-ISSUE #12] 请教一下,关于Lock的问题 #11
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @dahai118y on GitHub (May 28, 2020).
Original GitHub issue: https://github.com/ethendev/wopihost/issues/12
关于Lock的使用,我实在是有点晕。
可以简单讲讲吗?感谢
@ethendev commented on GitHub (May 28, 2020):
wopi协议里有个与锁有关的接口
与锁有关的操作有获取锁,加锁,刷新锁,解锁。我的代码中已经实现了这4个操作。在编辑文件的时候,office会调用上面的接口去获取锁,然后对文件加锁。如果加锁成功,就可以对文件进行编辑操作,加锁失败则不能编辑。刷新锁操作通过将文件的自动到期计时器重置为30分钟来刷新文件上的锁,之后会进行解锁。