move inline upload to seperate file