Be sure it is an uploaded file before saving it.