shared file enable

This commit is contained in:
Xuan Sang LE
2018-02-19 16:45:18 +01:00
parent 564df6c815
commit e50cdc3620
6 changed files with 82 additions and 10 deletions

View File

@ -131,8 +131,10 @@ class Blogger extends this.OS.GUI.BaseApplication
className: "fa fa-file-image-o",
action: (e) ->
me.openDialog "FileDiaLog", (d, n) ->
doc = me.editor.codemirror.getDoc()
doc.replaceSelection "![](#{me._api.handler.get}/#{d}/#{n})"
"#{d}/#{n}".asFileHandler().publish (r) ->
return me.error "Cannot export file for embeding to text" if r.error
doc = me.editor.codemirror.getDoc()
doc.replaceSelection "![](#{me._api.handler.shared}/#{r.result})"
, "Select image file", { mimes: ["image/.*"] }
},
"|",