mirror of
https://github.com/lxsang/antos-frontend.git
synced 2024-12-27 09:48:21 +01:00
allow unshare file
This commit is contained in:
parent
5c6c8a8115
commit
421f7e8b6c
@ -15,10 +15,11 @@ self.OS.API.handler =
|
||||
path = "#{_REST}/fs/mkdir"
|
||||
_API.post path, { path: p }, c, (e, s) ->
|
||||
_courrier.osfail "Fail to create directory: #{p}", e, s
|
||||
sharefile: (p, c) ->
|
||||
sharefile: (p, pub , c) ->
|
||||
path = "#{_REST}/fs/publish"
|
||||
_API.post path, { path: p }, c, (e, s) ->
|
||||
_API.post path, { path: p , publish: pub }, c, (e, s) ->
|
||||
_courrier.osfail "Fail to publish file: #{p}", e, s
|
||||
|
||||
fileinfo: (p, c) ->
|
||||
path = "#{_REST}/fs/fileinfo"
|
||||
_API.post path, { path: p }, c, (e, s) ->
|
||||
|
@ -147,7 +147,7 @@ class RemoteFileHandler extends self.OS.API.VFS.BaseFileHandler
|
||||
when "remove"
|
||||
_API.handler.delete @path, f
|
||||
when "publish"
|
||||
_API.handler.sharefile @path, f
|
||||
_API.handler.sharefile @path, true , f
|
||||
when "download"
|
||||
return if @info.type is "dir"
|
||||
_API.handler.fileblob @path, (d) ->
|
||||
@ -274,7 +274,7 @@ class SharedFileHandler extends self.OS.API.VFS.BaseFileHandler
|
||||
_API.handler.write @path, p, f
|
||||
|
||||
when "remove"
|
||||
_API.handler.delete @path, f
|
||||
_API.handler.sharefile @basename, false, f
|
||||
|
||||
when "upload"
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user