Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

If the form was sent without multipart-binary, there will be no :size…

… key. Handle this gracefully and invalidate the field without throwing an exception.
  • Loading branch information...
commit a21040c08cb882a8cf4245950dd04a4daed8ad3e 1 parent eb36d99
@kenrestivo kenrestivo authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  src/noir/validation.clj
3  src/noir/validation.clj
@@ -43,7 +43,8 @@
(defn valid-file?
"Returns true if a valid file was supplied"
- (and (> (:size m) 0)
+ (and (:size m)
+ (> (:size m) 0)
(:filename m)))
Please sign in to comment.
Something went wrong with that request. Please try again.