From 0a9d1ed3a645efda56ae757f45aa7efb5a35ce4f Mon Sep 17 00:00:00 2001 From: Michael Gapczynski Date: Mon, 27 Aug 2012 15:46:05 -0400 Subject: Initial previewer for public links --- core/js/js.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'core') diff --git a/core/js/js.js b/core/js/js.js index 86e802cd348..0c842f05593 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -29,6 +29,16 @@ function t(app,text){ } t.cache={}; +/** +* Get the path to download a file +* @param file The filename +* @param dir The directory the file is in - e.g. $('#dir').val() +* @return string +*/ +function fileDownloadPath(dir, file) { + return OC.filePath('files', 'ajax', 'download.php')+encodeURIComponent('?files='+encodeURIComponent(file)+'&dir='+encodeURIComponent(dir)); +} + OC={ webroot:oc_webroot, appswebroots:oc_appswebroots, -- cgit v1.2.3