Prettify upload code