now base64ing etag hashes for compatibility
This commit is contained in:
parent
647167dd0d
commit
ae567528d5
2 changed files with 3 additions and 1 deletions
|
@ -20,6 +20,7 @@ import Data.Conduit.Binary
|
|||
import qualified Data.Text as T
|
||||
import qualified Data.ByteString as B
|
||||
import qualified Data.ByteString.Lazy as L
|
||||
import Data.ByteString.Base64
|
||||
import Graphics.ImageMagick.MagickWand
|
||||
import qualified Crypto.Hash.SHA3 as SHA3
|
||||
|
||||
|
@ -124,7 +125,7 @@ generateThumb raw = do
|
|||
setImageCompressionQuality w 95
|
||||
setImageFormat w "png"
|
||||
getImageBlob w
|
||||
let h = SHA3.hash 16 thumb
|
||||
let h = encode (SHA3.hash 8 thumb)
|
||||
return (thumb, h)
|
||||
|
||||
getGetAvatarR :: AvatarId -> Handler TypedContent
|
||||
|
|
|
@ -101,6 +101,7 @@ library
|
|||
, conduit-extra
|
||||
, imagemagick
|
||||
, cryptohash
|
||||
, base64-bytestring
|
||||
|
||||
executable yammat
|
||||
if flag(library-only)
|
||||
|
|
Loading…
Reference in a new issue