<script src="https://unpkg.com/dropzone@6.0.0-beta.1/dist/dropzone-min.js"></script>
<link href="https://unpkg.com/dropzone@6.0.0-beta.1/dist/dropzone.css" rel="stylesheet" type="text/css" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@300&display=swap" rel="stylesheet">
<script src="https://code.jquery.com/jquery-2.2.4.js" integrity="sha256-iT6Q9iMJYuQiMWNd9lDyBUStIq/8PuOW33aOqmvFpqI=" crossorigin="anonymous"></script>
<style>
*{
    font-family: 'Montserrat', sans-serif;
}
form.dropzone.dz-clickable {
    border: 2px dashed #b9b9b9;
}
</style>
<form action="upload.php" id="dropzone" enctype="multipart/form-data"  class="dropzone">
    <input type="hidden" name="location" value="<?=$_GET["uk"]?>">
</form>
<script>
    Dropzone.autoDiscover = false;
    dropzone = new Dropzone("#dropzone", {
        url: 'upload.php',
        addRemoveLinks: true,
        dictDefaultMessage: "Arrastra archivos o da clic para seleccionarlos",
        dictRemoveFile: "Eliminar archivo"
    });
    //Init Dropzone
    dropzone.on("removedfile", function (file) {
        if (!file.name) { return; }
        $.ajax({
            type: 'POST',
            url: 'delete.php',
            dataType: "json",
            data: { FileName: file.name, location: '<?=$_GET["uk"]?>' },
            success: function (result) {
                console.log("deleted")
            }
        });
    });
</script>