adds file upload and storage function