Permalink
Browse files

Merge pull request #114 from kenrestivo/validate_file

If the form was sent without multipart-binary, there will be no :size key
  • Loading branch information...
2 parents eb36d99 + a21040c commit 3482117d10608b0539a4e82e1b8ae866a70bfaab @Raynes Raynes committed Jun 5, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/noir/validation.clj
View
@@ -43,7 +43,8 @@
(defn valid-file?
"Returns true if a valid file was supplied"
[m]
- (and (> (:size m) 0)
+ (and (:size m)
+ (> (:size m) 0)
(:filename m)))

0 comments on commit 3482117

Please sign in to comment.