diff options
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); + +}); |