prepare for upload