update media table and upload