Handle uploads properly