fix(file-upload): size limitation was inverted
This commit is contained in:
parent
908b1fc234
commit
de53c80a1e
@ -897,7 +897,7 @@ genericFileField mkOpts = Field{..}
|
||||
|
||||
handleUpload :: FileField -> Maybe Text -> ConduitT File FileReference (YesodDB UniWorX) ()
|
||||
handleUpload FileField{fieldMaxFileSize} mIdent
|
||||
= C.filter (\File{..} -> maybe (const True) (<) fieldMaxFileSize $ maybe 0 (fromIntegral . olength) fileContent)
|
||||
= C.filter (\File{..} -> maybe (const True) (>) fieldMaxFileSize $ maybe 0 (fromIntegral . olength) fileContent)
|
||||
.| sinkFiles
|
||||
.| maybe (C.map id) mkSessionFile mIdent
|
||||
where
|
||||
|
||||
Loading…
Reference in New Issue
Block a user