diff options
author | Roman Geber <rgeber@owncloudapps.com> | 2013-06-25 12:24:14 +0200 |
---|---|---|
committer | Roman Geber <rgeber@owncloudapps.com> | 2013-06-25 12:24:14 +0200 |
commit | ddb0ff346d3d8063f88fdba8749e098a81b92d54 (patch) | |
tree | 69004e69ed8ca2537d1029d9729d112feb6b5c20 /apps/files_sharing/js/public.js | |
parent | c3b8f2bf64ef7b6cbdabb382b1c0a721bddb4041 (diff) | |
download | nextcloud-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.js | 19 |
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); + +}); |