From 2438153c02f84bd0a01378fbdfc9b9697ef2f64a Mon Sep 17 00:00:00 2001 From: Xuan Sang LE Date: Thu, 22 Mar 2018 11:11:56 +0100 Subject: [PATCH] fix --- src/core/vfs.coffee | 4 ++++ src/core/vfs/GoogleDriveHandler.coffee | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/core/vfs.coffee b/src/core/vfs.coffee index 0814365..b072288 100644 --- a/src/core/vfs.coffee +++ b/src/core/vfs.coffee @@ -148,6 +148,7 @@ class BaseFileHandler meta: (f) -> + getlink: () -> @path # for main action read, write, remove, execute # must be implemented by subclasses action: (n, p, f) -> @@ -164,6 +165,9 @@ class RemoteFileHandler extends self.OS.API.VFS.BaseFileHandler meta: (f) -> _API.handler.fileinfo @path, f + getlink: () -> + _API.handler.get + "/" + @path + action: (n, p, f) -> me = @ switch n diff --git a/src/core/vfs/GoogleDriveHandler.coffee b/src/core/vfs/GoogleDriveHandler.coffee index dbb5e0a..be1c8d3 100644 --- a/src/core/vfs/GoogleDriveHandler.coffee +++ b/src/core/vfs/GoogleDriveHandler.coffee @@ -144,6 +144,10 @@ class GoogleDriveHandler extends this.OS.API.VFS.BaseFileHandler @sendB64 m, (data) -> xhr.send data.replace /^data:[^;]+;base64,/g, "" + getlink: () -> + return @info.webContentLink if @ready + return undefined + action: (n, p, f) -> me = @ q = _courrier.getMID()