diff options
author | Roeland Jago Douma <rullzer@owncloud.com> | 2016-02-03 11:29:36 +0100 |
---|---|---|
committer | Roeland Jago Douma <rullzer@owncloud.com> | 2016-02-03 11:29:36 +0100 |
commit | 4bb96a55536d51a0e8bde498f88be3eaea6a906b (patch) | |
tree | db62bc5aacb3a54e54678f92f8501d456dfe200b /apps/files_sharing/js/public.js | |
parent | aef43816c2a874c55896a6ba45edcee39eb899b9 (diff) | |
download | nextcloud-server-4bb96a55536d51a0e8bde498f88be3eaea6a906b.tar.gz nextcloud-server-4bb96a55536d51a0e8bde498f88be3eaea6a906b.zip |
Construct valid URL
Diffstat (limited to 'apps/files_sharing/js/public.js')
-rw-r--r-- | apps/files_sharing/js/public.js | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js index f2d6355d76a..bc609f04f79 100644 --- a/apps/files_sharing/js/public.js +++ b/apps/files_sharing/js/public.js @@ -155,11 +155,7 @@ OCA.Sharing.PublicApp = { this.fileList.getDownloadUrl = function (filename, dir, isDir) { var path = dir || this.getCurrentDirectory(); if (filename && !_.isArray(filename) && !isDir) { - var portPart = ''; - if (OC.getPort()) { - portPart = ':' + OC.getPort(); - } - return OC.getProtocol() + '://' + token + '@' + OC.getHost() + portPart + OC.getRootPath() + '/public.php/webdav' + OC.joinPaths(path, filename); + return OC.getProtocol() + '://' + token + '@' + OC.getHost() + OC.getRootPath() + '/public.php/webdav' + OC.joinPaths(path, filename); } if (_.isArray(filename)) { filename = JSON.stringify(filename); |