refactor uploader.js to use it more abstract
refactor uploader.js to use it more abstract