toying with Avatar caching
This commit is contained in:
parent
6e93762eee
commit
43d587b2ad
2 changed files with 3 additions and 1 deletions
|
@ -25,7 +25,8 @@ postNewAvatarR = do
|
||||||
FormSuccess na -> do
|
FormSuccess na -> do
|
||||||
raw <- runResourceT $ fileSource (avatarNewFile na) $$ sinkLbs
|
raw <- runResourceT $ fileSource (avatarNewFile na) $$ sinkLbs
|
||||||
thumb <- generateThumb $ B.concat $ L.toChunks raw
|
thumb <- generateThumb $ B.concat $ L.toChunks raw
|
||||||
runDB $ insert_ $ Avatar (avatarNewIdent na) thumb
|
now <- liftIO $ getCurrentTime
|
||||||
|
runDB $ insert_ $ Avatar (avatarNewIdent na) thumb now
|
||||||
setMessageI MsgAvatarUploadSuccessfull
|
setMessageI MsgAvatarUploadSuccessfull
|
||||||
redirect $ HomeR
|
redirect $ HomeR
|
||||||
_ -> do
|
_ -> do
|
||||||
|
|
|
@ -32,6 +32,7 @@ CashCheck
|
||||||
Avatar
|
Avatar
|
||||||
ident Text
|
ident Text
|
||||||
data ByteString
|
data ByteString
|
||||||
|
altTime UTCTime default=now()
|
||||||
deriving Typeable Show
|
deriving Typeable Show
|
||||||
Barcode
|
Barcode
|
||||||
code Text
|
code Text
|
||||||
|
|
Loading…
Reference in a new issue