Skip to content

Instantly share code, notes, and snippets.

@joshlong
Created March 13, 2013 21:09
Show Gist options
  • Select an option

  • Save joshlong/5156244 to your computer and use it in GitHub Desktop.

Select an option

Save joshlong/5156244 to your computer and use it in GitHub Desktop.
write a user's profile photo
@RequestMapping(value = USER_COLLECTION_ENTRY_PHOTO_URL, method = RequestMethod.POST)
@ResponseBody
public Long uploadBasedOnPathVariable(@PathVariable("userId") Long userId, @RequestParam("file") MultipartFile file) throws Throwable {
byte[] bytesForImage = file.getBytes();
userService.writeUserProfilePhotoAndQueueForConversion(userId, file.getName(), bytesForImage);
return userId;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment