From 99766eefafaf33008b080a7a0d9173c3871037a2 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 15 Nov 2009 16:31:19 +0100 Subject: don't check filesize but rely on error on upload FS#1716 Ignore-this: adff36f3e49963a6682b5faabf6cb63e darcs-hash:20091115153119-7ad00-2c20c420faeea08c113a76acc05917621f361880.gz --- inc/media.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'inc') diff --git a/inc/media.php b/inc/media.php index d8ca288c1..3850f4e33 100644 --- a/inc/media.php +++ b/inc/media.php @@ -239,11 +239,8 @@ function media_upload($ns,$auth){ $file = $_FILES['upload']; if(empty($id)) $id = $file['name']; - // check for data - if(!@filesize($file['tmp_name'])){ - msg('No data uploaded. Disk full?',-1); - return false; - } + // check for errors (messages are done in lib/exe/mediamanager.php) + if($file['error']) return false; // check extensions list($fext,$fmime,$dl) = mimetype($file['name']); -- cgit v1.2.3