⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.142
Server IP:
217.76.53.76
Server:
Linux vmi1397931.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64
Server Software:
Apache
PHP Version:
8.2.27
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
www
/
wwwroot
/
wixi.com.ng
/
public
/
assets
/
user
/
js
/
View File Name :
dropzone-file-upload.js
Dropzone.options.fileDropzone = { paramName: 'file', acceptedFiles: '.txt, .doc, .docx, .pdf, .zip', url: fileUpUrl, method: 'post', success: function (file, response) { // remove error message if exist $('#err_file').text(''); $('#file-original-name').append(`
`); $('#file-unique-name').append(`
`); // create remove button const rmvBtn = Dropzone.createElement("
"); // capture the dropzone instance as closure let _this = this; // bind an event to the remove button rmvBtn.addEventListener('click', function (event) { // make sure the button click event doesn't submit the form event.preventDefault(); event.stopPropagation(); // remove file from dropzone preview _this.removeFile(file); // remove file from storage rmvFile(response.originalName, response.uniqueName); }); // add the remove button to the file preview element file.previewElement.appendChild(rmvBtn); }, error: function (file, message) { $('#err_file').text(message?.error?.file[0]); $('#err_file').text(message?.exception); // create remove button const rmvBtn = Dropzone.createElement("
"); // capture the dropzone instance as closure let _this = this; // bind an event to the remove button rmvBtn.addEventListener('click', function (event) { // make sure the button click event doesn't submit the form event.preventDefault(); event.stopPropagation(); // remove file from dropzone preview _this.removeFile(file); }); // add the remove button to the file preview element file.previewElement.appendChild(rmvBtn); } }; function rmvFile(orgName, unqName) { $.ajax({ url: fileRmvUrl, type: 'POST', data: { 'title': unqName }, success: function (response) { const orgEle = document.getElementById('file-org-' + orgName); orgEle.remove(); const unqEle = document.getElementById('file-unq-' + unqName); unqEle.remove(); }, error: function (response) { } }); }