Use proper API to get a download URL

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Morris Jobke 2018-01-23 13:58:30 +01:00
parent 9e74b9c6a6
commit 344996f157
No known key found for this signature in database
GPG key ID: FE03C3A163FEDE68

View file

@ -54,7 +54,7 @@ function escapeHTML(s) {
* @deprecated use Files.getDownloadURL() instead
*/
function fileDownloadPath(dir, file) {
return OC.filePath('files', 'ajax', 'download.php')+'?files='+encodeURIComponent(file)+'&dir='+encodeURIComponent(dir);
return OCA.Files.Files.getDownloadUrl(file, dir);
}
/** @namespace */