aboutsummaryrefslogtreecommitdiffstats
path: root/view/js/mod_cloud.js
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-12-22 09:01:52 +0000
committerMario <mario@mariovavti.com>2020-12-22 09:01:52 +0000
commit60cbb65d84cdc2854bdcf1613cf67180878c44dd (patch)
treed007f9ee410fd20aebd312d726d55f4666426719 /view/js/mod_cloud.js
parentd118ab71e6aa4f300ba6e42663d13a63a2323122 (diff)
downloadvolse-hubzilla-60cbb65d84cdc2854bdcf1613cf67180878c44dd.tar.gz
volse-hubzilla-60cbb65d84cdc2854bdcf1613cf67180878c44dd.tar.bz2
volse-hubzilla-60cbb65d84cdc2854bdcf1613cf67180878c44dd.zip
files_ng: omit parent folders of a download
Diffstat (limited to 'view/js/mod_cloud.js')
-rw-r--r--view/js/mod_cloud.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/view/js/mod_cloud.js b/view/js/mod_cloud.js
index 736dec471..516284d9b 100644
--- a/view/js/mod_cloud.js
+++ b/view/js/mod_cloud.js
@@ -69,6 +69,7 @@ $(document).ready(function () {
// some trickery to trigger download action via ajax
let form = $('<form></form>').attr('action', 'attach').attr('method', 'post');
+ form.append($("<input></input>").attr('type', 'hidden').attr('name', 'attach_path').attr('value', window.location.pathname));
form.append($("<input></input>").attr('type', 'hidden').attr('name', 'channel_id').attr('value', channelId));
form.append($("<input></input>").attr('type', 'hidden').attr('name', 'attach_ids[]').attr('value', id));
form.appendTo('body').submit().remove();
@@ -286,6 +287,7 @@ $(document).ready(function () {
// some trickery to trigger download action via ajax
var form = $('<form></form>').attr('action', 'attach').attr('method', 'post');
+ form.append($("<input></input>").attr('type', 'hidden').attr('name', 'attach_path').attr('value', window.location.pathname));
form.append($("<input></input>").attr('type', 'hidden').attr('name', 'channel_id').attr('value', channelId));
post_data.each(function () {
form.append($("<input></input>").attr('type', 'hidden').attr('name', 'attach_ids[]').attr('value', this.value));