Last active
July 18, 2017 05:48
-
-
Save speedygfw/098ade31605056167c7b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
what does the "file" mean in function createThumbnailFromUrl(file, imageUrl, callback, crossOrigin)