Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function() {
- $('#newCaseForm').fileupload({
- url: 'https://qa-cm.cloud.akzonobel.global/cases/25',
- type: 'POST',
- uploadTemplateId: 'case-attachment-template-upload',
- downloadTemplateId: 'case-attachment-template-download',
- maxNumberOfFiles: 10,
- singleFileUploads: true,
- autoUpload: false,
- add: function (e, data) {
- if (e.isDefaultPrevented()) {
- return false;
- }
- var $this = $(this),
- that = $this.data('blueimp-fileupload') ||
- $this.data('fileupload'),
- options = that.options;
- data.context = that._renderUpload(data.files)
- .data('data', data)
- .addClass('processing');
- options.filesContainer[
- options.prependFiles ? 'prepend' : 'append'
- ](data.context);
- that._forceReflow(data.context);
- that._transition(data.context);
- console.log(data);
- $('#submitCaseFiles').click(function() {
- data.submit();
- });
- },
- beforeSend: function(oXhr) {
- oXhr.setRequestHeader('dirty-hack-jwt-token', sJwtToken);
- },
- send: function (e, data) {
- console.log('Send');
- console.log(e);
- console.log(data);
- }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement