Get started with dropzone CDN
MIT licensed
Dropzone is a popular library for creating drag-and-drop file uploads.
Tags:- html5
- file
- upload
Stable version
Copied!
How to start using dropzone CDN
<!DOCTYPE html>
<html>
<head>
<title>Get started with dropzone CDN - cdnhub.io</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/dropzone/5.9.3/min/dropzone.min.css" referrerpolicy="no-referrer" />
</head>
<body>
<div id="dropzoneContainer">
<form action="/upload" class="dropzone" id="myDropzone"></form>
</div>
<script src="https://cdn.cdnhub.io/dropzone/5.9.3/dropzone.min.js" referrerpolicy="no-referrer"></script>
<script>
document.addEventListener("domcontentloaded", function() {
const myDropzone = new Dropzone("#myDropzone", {
url: "/upload", // Set the URL to your server-side upload script
acceptedFiles: "image/*",
maxFilesize: 2, // MB
addRemoveLinks: true,
init: function() {
this.on("success", function(file, response) {
// Handle successful uploads
console.log("File " + file.name + " uploaded with response: " + response.message);
});
}
});
});
</script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
All versions
1.3.4
2.0.4
2.0.8
3.10.2
3.11.0
3.11.1
3.11.2
3.11.3
3.12.0
3.6.1
3.6.2
3.7.1
3.7.4
3.8.1
3.8.2
3.8.3
3.8.4
3.9.0
4.0.0
4.0.1
4.1.0
4.1.1
4.2.0
4.3.0
5.0.1
5.1.0
5.1.1
5.2.0
5.3.0
5.3.1
5.4.0
5.5.0
5.5.1
5.6.0
5.6.1
5.7.0
5.7.1
5.7.2
5.7.3
5.7.4
5.7.5
5.7.6
5.8.0
5.8.1
5.9.0
5.9.1
5.9.2
*** 5.9.3
6.0.0-beta.1
6.0.0-beta.2