mirror of
https://github.com/antos-rde/antosdk-apps.git
synced 2024-12-25 11:48:21 +01:00
update onlyoffice backend API
This commit is contained in:
parent
40785f86bf
commit
3ff8f1a6eb
@ -1,6 +1,7 @@
|
|||||||
local args=...
|
local args=...
|
||||||
local vfs = require("vfs")
|
local vfs = require("vfs")
|
||||||
|
|
||||||
|
local DLCMD="wget --no-check-certificate -O"
|
||||||
if not args then
|
if not args then
|
||||||
args = REQUEST
|
args = REQUEST
|
||||||
end
|
end
|
||||||
@ -95,7 +96,7 @@ end
|
|||||||
handle.duplicate = function(data)
|
handle.duplicate = function(data)
|
||||||
local file = vfs.ospath(data.as)
|
local file = vfs.ospath(data.as)
|
||||||
local tmpfile = "/tmp/"..std.sha1(file)
|
local tmpfile = "/tmp/"..std.sha1(file)
|
||||||
local cmd = "wget -O "..tmpfile..' "'..data.remote..'"'
|
local cmd = DLCMD.." "..tmpfile..' "'..data.remote..'"'
|
||||||
os.execute(cmd)
|
os.execute(cmd)
|
||||||
-- move file to correct position
|
-- move file to correct position
|
||||||
if ulib.exists(tmpfile) then
|
if ulib.exists(tmpfile) then
|
||||||
@ -123,7 +124,7 @@ handle.save = function()
|
|||||||
local file = vfs.ospath(REQUEST.file)
|
local file = vfs.ospath(REQUEST.file)
|
||||||
if data.status == 2 then
|
if data.status == 2 then
|
||||||
local tmpfile = "/tmp/"..std.sha1(file)
|
local tmpfile = "/tmp/"..std.sha1(file)
|
||||||
local cmd = "wget -O "..tmpfile..' "'..data.url..'"'
|
local cmd = DLCMD.." "..tmpfile..' "'..data.url..'"'
|
||||||
os.execute(cmd)
|
os.execute(cmd)
|
||||||
-- move file to correct position
|
-- move file to correct position
|
||||||
if ulib.exists(tmpfile) then
|
if ulib.exists(tmpfile) then
|
||||||
@ -145,7 +146,7 @@ handle.save = function()
|
|||||||
local new_key = std.sha1(file..":"..stat.mtime)
|
local new_key = std.sha1(file..":"..stat.mtime)
|
||||||
-- save changes
|
-- save changes
|
||||||
if(data.changesurl) then
|
if(data.changesurl) then
|
||||||
cmd = "wget -O "..history_dir.."/"..new_key..'.zip "'..data.changesurl..'"'
|
cmd = DLCMD.." "..history_dir.."/"..new_key..'.zip "'..data.changesurl..'"'
|
||||||
os.execute(cmd)
|
os.execute(cmd)
|
||||||
end
|
end
|
||||||
-- now save version object
|
-- now save version object
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user