x

Main chapters

  1. LimeSurvey Cloud vs LimeSurvey CE
  2. LimeSurvey Cloud - Quick start guide
  3. LimeSurvey CE - Installation
  4. How to design a good survey (Guide)
  5. Getting started
  6. LimeSurvey configuration
  7. Introduction - Surveys
  8. View survey settings
  9. View survey menu
  10. View survey structure
  11. Introduction - Questions
  12. Introduction - Question Groups
  13. Introduction - Surveys - Management
  14. Survey toolbar options
  15. Multilingual survey
  16. Quick start guide - ExpressionScript
  17. Advanced features
  18. General FAQ
  19. Troubleshooting
  20. Workarounds
  21. License
  22. Version change log
  23. Plugins - Advanced
 Actions

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)