From 7c1309ea483b21cb2f97a509b61cb3363de8edb8 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Thu, 28 Mar 2013 12:37:42 +0100 Subject: client side settings save, working dl button on dashboard --- module/api/FileApi.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'module/api/FileApi.py') diff --git a/module/api/FileApi.py b/module/api/FileApi.py index a5d5a8535..8a55d9dfd 100644 --- a/module/api/FileApi.py +++ b/module/api/FileApi.py @@ -74,6 +74,14 @@ class FileApi(ApiComponent): raise FileDoesNotExists(fid) return info + @RequirePerm(Permission.Download) + def getFilePath(self, fid): + """ Internal method to get the filepath""" + info = self.getFileInfo(fid) + pack = self.core.files.getPackage(info.package) + return pack.getPath(), info.name + + @RequirePerm(Permission.All) def findFiles(self, pattern): return self.core.files.getTree(-1, True, DownloadState.All, pattern) -- cgit v1.2.3