<form action="/upload">
	<div class="dropzone"></div>
</form>
.dropzone {
	border-radius: 4px;
	border: 2px dashed #0087f7 !important;
	width: 500px;
	margin-left: auto;
	margin-right: auto;
	margin-bottom: 1em;
}

.dz-success-mark {
	background-color: rgb( 102, 187, 106, .8 )!important;
}

.dz-success-mark svg {
	font-size: 54px;
	fill: #fff !important;
}

.dz-error-mark {
	background-color: rgba( 239, 83, 80, .8 ) !important;
}

.dz-error-mark svg {
	font-size: 54px;
	fill: #fff !important;
}
const dropzone = new Dropzone( '.dropzone', {
	url: '/upload',
});

dropzone.on( 'success', file => {
	const response = JSON.parse( file.xhr.response );
	console.log( response.id );
} );

External CSS

  1. https://unpkg.com/[email protected]/dist/dropzone.css

External JavaScript

  1. https://unpkg.com/[email protected]/dist/dropzone-min.js