You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How can I use multiple upload field in one dropzone?
I have 2 upload file field, I want to use all of them in 1 dropzone.
My HTML structure as below:
<div class="dropzone modal_resource_files_upload" id="update_creative_dropzone">
<div class="dz-message needsclick">
<i class="ki-duotone ki-file-up fs-3hx text-primary">
<span class="path1"></span>
<span class="path2"></span>
</i>
<div class="ms-4">
<h3 class="dfs-3 fs-5 fw-bold text-gray-900 mb-1">Drop campaign files here or click to upload.</h3>
<span class="fw-semibold fs-6 text-muted">Upload only 1 file</span>
</div>
</div>
</div>
AND
<div class="dropzone modal_resource_files_upload" id="create_creative_dropzone">
<div class="dz-message needsclick">
<i class="ki-duotone ki-file-up fs-3hx text-primary">
<span class="path1"></span>
<span class="path2"></span>
</i>
<div class="ms-4">
<h3 class="dfs-3 fs-5 fw-bold text-gray-900 mb-1">Drop campaign files here or click to upload.</h3>
<span class="fw-semibold fs-6 text-muted">Upload only 1 file</span>
</div>
</div>
</div>
I try to do this:
Dropzone.autoDiscover = false;
Dropzone.options.myAwesomeDropzone = false;
$(document).ready(function() {
$('.modal_resource_files_upload').on('click', function() {
var id = '#' + this.id;
var myDropzone = new Dropzone(id, {
url: "{{route('upload.upload_resource')}}", // Set the url for your upload script location
paramName: "file", // The name that will be used to transfer the file
maxFiles: 1,
maxFilesize: 10, // MB
createImageThumbnails: false,
addRemoveLinks: true,
thumbnailMethod: 'contain',
accept: function(file, done) {
}
});
});
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
How can I use multiple upload field in one dropzone?
I have 2 upload file field, I want to use all of them in 1 dropzone.
My HTML structure as below:
I try to do this:
Beta Was this translation helpful? Give feedback.
All reactions