mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-29 03:01:58 +08:00
Add text extraction on unlock
This commit is contained in:
parent
02ddd64aaa
commit
5e5f4c5ed4
1 changed files with 3 additions and 1 deletions
|
@ -142,6 +142,7 @@ class WopiController < ActionController::Base
|
|||
unlocking lock #{lock}"
|
||||
if @asset.lock == lock
|
||||
@asset.unlock
|
||||
@asset.post_process_file(@organization)
|
||||
response.headers['X-WOPI-ItemVersion'] = @asset.version
|
||||
render nothing: :true, status: 200 and return
|
||||
else
|
||||
|
@ -188,7 +189,6 @@ class WopiController < ActionController::Base
|
|||
end
|
||||
end
|
||||
|
||||
# TODO: When should we extract file text?
|
||||
def put_file
|
||||
@asset.with_lock do
|
||||
lock = request.headers['X-WOPI-Lock']
|
||||
|
@ -233,8 +233,10 @@ class WopiController < ActionController::Base
|
|||
|
||||
if @assoc.class == Step
|
||||
@protocol = @asset.step.protocol
|
||||
@organization = @protocol.organization
|
||||
else
|
||||
@my_module = @assoc.my_module
|
||||
@organization = @my_module.experiment.project.organization
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue