Save uploaded documents properly.