From 04d559dd4713ce219d4594e4221f2e5657be0a1e Mon Sep 17 00:00:00 2001 From: Acconut Date: Thu, 5 Feb 2015 18:25:38 +0100 Subject: [PATCH] do not check size if MaxSize == 0 --- handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handler.go b/handler.go index 9892525..da196a6 100644 --- a/handler.go +++ b/handler.go @@ -155,7 +155,7 @@ func (handler *Handler) postFile(w http.ResponseWriter, r *http.Request) { } // Test whether the size is still allowed - if size > handler.config.MaxSize { + if handler.config.MaxSize > 0 && size > handler.config.MaxSize { handler.sendError(w, ErrMaxSizeExceeded) return }