Factored out some of the drag and drop code so it can be used without an uploader.