Skip to content

Instantly share code, notes, and snippets.

@antoniodemora
Created March 28, 2019 17:40
Show Gist options
  • Save antoniodemora/426097a646378e6d60dd2fdd9bd3ba34 to your computer and use it in GitHub Desktop.
Save antoniodemora/426097a646378e6d60dd2fdd9bd3ba34 to your computer and use it in GitHub Desktop.
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" media="screen" href="dropzone.css">
<script src="dropzone.js"></script>
<script>
var dzCargada;
var cargaDropzone = function (){
dzCargada = new Dropzone("#dzRegion", {
url: "/prueba.php",
addRemoveLinks: true,
maxFiles: 1
});
}
</script>
<title>Probando DZ Programáticamente</title>
</head>
<body>
<h1>Aqui crearemos el dropzone al picar un botón :)</h1>
<button type="button" onclick="cargaDropzone()">Carga DZ</button>
<div id="dzRegion" style="height: 100px"></div>
<form action="/file-upload" class="dropzone" id="my-awesome-dropzone"></form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment