}
@SuppressWarnings("rawtypes")
@RequestMapping(value = "/upload", method = RequestMethod.POST)
public String uploadPhoto(@ModelAttribute PhotoUpload photoUpload, BindingResult result, ModelMap model) throws IOException {
PhotoUploadValidator validator = new PhotoUploadValidator();
validator.validate(photoUpload, result);
Map uploadResult = null;
if (photoUpload.getFile() != null && !photoUpload.getFile().isEmpty()) {
uploadResult = Singleton.getCloudinary().uploader().upload(photoUpload.getFile().getBytes(),
Cloudinary.asMap("resource_type", "auto"));