This commit is contained in:
Kerim 2023-08-31 14:51:42 +05:00
parent f10b3e71aa
commit 17a65967fc
1 changed files with 1 additions and 34 deletions

View File

@ -133,40 +133,7 @@
{% put scripts %}
<script>
Dropzone.options.uploadWidget = {
paramName: 'file',
maxFilesize: 2, // MB
maxFiles: 1,
dictDefaultMessage: 'Drag an image here to upload, or click to select one',
headers: {
'x-csrf-token': document.querySelectorAll('meta[name=csrf-token]')[0].getAttributeNode('content').value,
},
acceptedFiles: 'image/*',
init: function () {
this.on('success', function (file, resp) {
console.log(file);
console.log(resp);
});
this.on('thumbnail', function (file) {
if (file.accepted !== false) {
if (file.width < 640 || file.height < 480) {
file.rejectDimensions();
}
else {
file.acceptDimensions();
}
}
});
},
accept: function (file, done) {
file.acceptDimensions = done;
file.rejectDimensions = function () {
done('The image must be at least 640 x 480px')
};
}
};
</script>
<script src="{{'assets/seller/js/ckeditor-classic.js'|theme}}"></script>
<script>
function getFile(fileq) {