diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2012-08-27 15:46:05 -0400 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2012-08-27 20:37:38 -0400 |
commit | 0a9d1ed3a645efda56ae757f45aa7efb5a35ce4f (patch) | |
tree | a2fbdc55f42a149c8a5e738763ce731e9c55f6dc /core | |
parent | 8374a49cc19cf43489a415388fd782ba1574ee82 (diff) | |
download | nextcloud-server-0a9d1ed3a645efda56ae757f45aa7efb5a35ce4f.tar.gz nextcloud-server-0a9d1ed3a645efda56ae757f45aa7efb5a35ce4f.zip |
Initial previewer for public links
Diffstat (limited to 'core')
-rw-r--r-- | core/js/js.js | 10 |
1 files changed, 10 insertions, 0 deletions
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, |