Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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
kenrestivo committed Jun 4, 2012
1 parent eb36d99 commit a21040c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/noir/validation.clj
Expand Up @@ -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)))


Expand Down

0 comments on commit a21040c

Please sign in to comment.