Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // theirpic is an Option[ByteString]
- Try (theirpic.map(_.toArray).foreach { pic =>
- val fos = new FileOutputStream("img_avatar_" + user.uid)
- fos.write(pic)
- }) recover {
- case _ => logger.warn("Couldn't store new user's avatar.")
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement