Skip to content

Commit

Permalink
Initiailzed
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanThompson committed Jan 13, 2017
1 parent 3f15f3e commit 1d274c0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion resources/js/upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@ $(function () {

template.remove();

var dropzone = new Dropzone('.dropzone',
var dropzone = new Dropzone('.dropzone:not(data-initialized)',
{
paramName: 'upload',
url: REQUEST_ROOT_PATH + '/streams/files-field_type/handle',
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
init: function () {
$('.dropzone').attr('data-initialized', '');
},
sending: function (file, xhr, formData) {
formData.append('folder', element.data('folder'));
},
Expand Down

0 comments on commit 1d274c0

Please sign in to comment.