Skip to content

Instantly share code, notes, and snippets.

View elipeters's full-sized avatar

Eli Peters elipeters

View GitHub Profile
<div id="actions" class="row my-4">
<div class="col-lg-7">
<!-- The fileinput-button span is used to style the file input field as button -->
<span class="btn btn-success fileinput-button dz-clickable">
<i class="icon-plus small-text"></i>
<span>Add files...</span>
</span>
<button type="submit" class="btn btn-primary start">
<i class="icon-arrow-circle-o-up icon-offset"></i>
// Get the template HTML and remove it from the doumenthe template HTML and remove it from the doument
var previewNode = document.querySelector("#template");
previewNode.id = "";
var previewTemplate = previewNode.parentNode.innerHTML;
previewNode.parentNode.removeChild(previewNode);
var myDropzone = new Dropzone(document.body, { // Make the whole body a dropzone
url: "/target-url", // Set the url
thumbnailWidth: 80,
thumbnailHeight: 80,