added transaction for file upload