Skip to content

Instantly share code, notes, and snippets.

@speedygfw
Last active July 18, 2017 05:48
Show Gist options
  • Save speedygfw/098ade31605056167c7b to your computer and use it in GitHub Desktop.
Save speedygfw/098ade31605056167c7b to your computer and use it in GitHub Desktop.
//erzeugen ein mockup
var mockFile = { name: "Filename", size: 12345 };
// aufruf des default addedfile event handlers
myDropzone.emit("addedfile", mockFile);
// zeige das thumbnail an
myDropzone.emit("thumbnail", mockFile, "/image/url");
//achtung langsam: erzeuge ein neues thumbnail
myDropzone.createThumbnailFromUrl(file, imageUrl, callback, crossOrigin);
// stelle sicher, dass keine progressbar vorhanden ist
myDropzone.emit("complete", mockFile);
// korrigiere die maxfiles option
var existingFileCount = 1;
myDropzone.options.maxFiles = myDropzone.options.maxFiles - existingFileCount;
@KevinAccount
Copy link

what does the "file" mean in function createThumbnailFromUrl(file, imageUrl, callback, crossOrigin)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment