Skip to content

Commit

Permalink
Fixed issue #8118: Participant can upload file without size limit wit…
Browse files Browse the repository at this point in the history
…h question type fileupload.

Dev: quick fix
Dev: max file is done by EM in survey page
  • Loading branch information
Shnoulle committed Oct 4, 2013
1 parent b0e6681 commit 6d9dccc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions application/controllers/UploaderController.php
Expand Up @@ -111,13 +111,12 @@ function run($actionID)
$filename = $_FILES['uploadfile']['name'];
$size = 0.001 * $_FILES['uploadfile']['size'];
$valid_extensions = strtolower($_POST['valid_extensions']);
$maxfilesize = (int) $_POST['max_filesize'];
$preview = $_POST['preview'];
$fieldname = $_POST['fieldname'];
$aFieldMap = createFieldMap($surveyid,'short',false,false,$_SESSION['survey_'.$surveyid]['s_lang']);
if (!isset($aFieldMap[$fieldname])) die();
$aAttributes=getQuestionAttributeValues($aFieldMap[$fieldname]['qid'],$aFieldMap[$fieldname]['type']);

$maxfilesize = (int) $aAttributes['max_filesize'];
$valid_extensions_array = explode(",", $aAttributes['allowed_filetypes']);
$valid_extensions_array = array_map('trim',$valid_extensions_array);

Expand Down

0 comments on commit 6d9dccc

Please sign in to comment.