Small improvements in uploads security