From 7d393650e7e231a68038ccb9fd069cd95746806b Mon Sep 17 00:00:00 2001 From: Olivier Paroz Date: Wed, 19 Aug 2015 01:52:12 +0200 Subject: Add download API --- js/galleryfileaction.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'js/galleryfileaction.js') diff --git a/js/galleryfileaction.js b/js/galleryfileaction.js index 314d2e10..8b140961 100644 --- a/js/galleryfileaction.js +++ b/js/galleryfileaction.js @@ -88,7 +88,12 @@ requesttoken: oc_requesttoken }; imageUrl = galleryFileAction.buildGalleryUrl('preview', '/' + file.id, params); - downloadUrl = imageUrl + '&download'; + params = { + c: file.etag, + requesttoken: oc_requesttoken + }; + downloadUrl = + galleryFileAction.buildGalleryUrl('files/download', '/' + file.id, params); images.push({ name: file.name, -- cgit v1.2.3