BeforeProcessFileUpload
From LimeSurvey Manual
When
This event is fired when permission is saved via the admin GUI, just after $_FILES was checked.
Input
The event receives the following information:
- surveyId : The survey id
- responseId : The response id (null if preview)
- qid : The upload question id
- preview : Preview mode as boolean
- fieldname : The fieldname of the DB (as SGQA)
- maxfilesize : The max file size question advanced setting
- valid_extensions_array : The valid extension question advanced settings as array
- success : boolean (set as true by core)
- filename : The filename of the file
- size : The size of the file
- tmp_name : The temporary name of the uploaded file ($_FILES['uploadfile']['tmp_name'])
- ext : The extension of the filename
- randfilename : The random file name generated by LimeSurvey (futmp_) (used in case of success)
- randfileloc :The final location on server include the random filename (used in case of success)
Possible output
- success : Boolean, if false : file was not moved and was deleted on serveur
- msg : A string to return to user (in case of success or error)
- disableCheck : Boolean : disable default LimeSurvey core checking about size and format/extension.
- movefile : Boolean, allow LimeSurvey core to move the file (default as true)
- filename : The filename to be used in response part
- ext :Extension to be used
- tmp_name : The temporary file name (used as real uploaded file content)
- randfilename : the final random filename
- randfileloc : the final random file location (include randfilename)