Drag the DropOnUnity Component in your scene
Add a EDragDropTarget Component to the gameObjects you want the user to be able to change the main texture of.
Make sure those gameObjects have a collider component (or else it is not possible to detect if the mouse is hovering over them or not)
Build and run your project with the build target WebPlayer or WebGL.
Drag an image from your computer on the gameObjects.