aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/js/public.js
diff options
context:
space:
mode:
authorRoman Geber <rgeber@owncloudapps.com>2013-06-25 12:24:14 +0200
committerRoman Geber <rgeber@owncloudapps.com>2013-06-25 12:24:14 +0200
commitddb0ff346d3d8063f88fdba8749e098a81b92d54 (patch)
tree69004e69ed8ca2537d1029d9729d112feb6b5c20 /apps/files_sharing/js/public.js
parentc3b8f2bf64ef7b6cbdabb382b1c0a721bddb4041 (diff)
downloadnextcloud-server-ddb0ff346d3d8063f88fdba8749e098a81b92d54.tar.gz
nextcloud-server-ddb0ff346d3d8063f88fdba8749e098a81b92d54.zip
Public upload feature
Diffstat (limited to 'apps/files_sharing/js/public.js')
-rw-r--r--apps/files_sharing/js/public.js19
1 files changed, 18 insertions, 1 deletions
diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js
index 916e35419c1..0244f392a0e 100644
--- a/apps/files_sharing/js/public.js
+++ b/apps/files_sharing/js/public.js
@@ -7,6 +7,8 @@ function fileDownloadPath(dir, file) {
return url;
}
+var form_data;
+
$(document).ready(function() {
if (typeof FileActions !== 'undefined') {
@@ -46,4 +48,19 @@ $(document).ready(function() {
});
}
-}); \ No newline at end of file
+ // Add some form data to the upload handler
+ file_upload_param.formData = {
+ MAX_FILE_SIZE: $('#uploadMaxFilesize').val(),
+ requesttoken: $('#publicUploadRequestToken').val(),
+ dirToken: $('#dirToken').val(),
+ appname: 'files_sharing',
+ subdir: $('input#dir').val()
+ };
+
+ // Add Uploadprogress Wrapper to controls bar
+ $('#controls').append($('#additional_controls div#uploadprogresswrapper'));
+
+ // Cancel upload trigger
+ $('#cancel_upload_button').click(Files.cancelUploads);
+
+});