Added image detection to upload servlet