Skip to content
This repository was archived by the owner on Nov 1, 2020. It is now read-only.

Commit 812d563

Browse files
authored
Merge pull request #271 from nextcloud/public-share-links
create "file app" public share links if the slideshow is opened from …
2 parents bc2a457 + c08177b commit 812d563

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

js/galleryfileaction.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,4 +227,9 @@ $(document).ready(function () {
227227
window.galleryFileAction.buildFeaturesList(config.features);
228228
window.galleryFileAction.register(config.mediatypes);
229229
});
230+
231+
// create public share links as from the files app
232+
if (!Gallery.appName) {
233+
Gallery.appName = 'files';
234+
}
230235
});

js/vendor/nextcloud/share.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,8 +580,13 @@
580580
$linkCheckbox.attr('data-id', id);
581581
var $linkText = $('#linkText');
582582

583-
var link = parent.location.protocol + '//' + location.host +
584-
OC.generateUrl('/apps/gallery/s/') + token;
583+
if (Gallery.appName === 'files') {
584+
var link = parent.location.protocol + '//' + location.host +
585+
OC.generateUrl('/s/') + token;
586+
} else {
587+
var link = parent.location.protocol + '//' + location.host +
588+
OC.generateUrl('/apps/gallery/s/') + token;
589+
}
585590

586591
$linkText.val(link);
587592
$linkText.slideDown(OC.menuSpeed);

0 commit comments

Comments
 (0)