Examples Image Drop

Image Drop

drop() is a p5.js element method that registers a callback every time a file is loaded into the element. The uploaded file is created into a p5.File class. You can use the drop() callback to check the file type, then write conditional statements responding to the file type.