MCPcopy Index your code
hub / github.com/blueimp/JavaScript-Load-Image / fileChangeHandler

Function fileChangeHandler

js/demo/demo.js:196–205  ·  view source on GitHub ↗

* Handles drop and file selection change events * * @param {event} event Drop or file selection change event

(event)

Source from the content-addressed store, hash-verified

194 * @param {event} event Drop or file selection change event
195 */
196 function fileChangeHandler(event) {
197 event.preventDefault()
198 var originalEvent = event.originalEvent
199 var target = originalEvent.dataTransfer || originalEvent.target
200 var file = target && target.files && target.files[0]
201 if (!file) {
202 return
203 }
204 displayImage(file)
205 }
206
207 /**
208 * Handles URL change events

Callers

nothing calls this directly

Calls 1

displayImageFunction · 0.85

Tested by

no test coverage detected