Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-30774

Web service upload script: some errors returned by the script are not clear


    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.1.3, 2.2, Future Dev
    • Fix Version/s: DEV backlog
    • Component/s: Web Services
    • Labels:
    • Affected Branches:


      Running the My Mobile app (App 1.0.2 / Moodle 2.2) Apu can see 'Error : The uploaded file exceeds the upload_max_filesize directive in php.ini'

      The client can not do much with this error. He doesn't want to display this error to the lambda user, neither he can know what error it is as there is no error code.

      two things to fix (or not) in webservice/upload.php:

      a) $_FILES[][error] should probably not return any exception. We should probably do like filenameexists/$_FILES[]['size'] do not throw exception, just return error messages (so the script still try to upload good files).

      b) we probably should return a code error like we do for "filenameexists". We also could return an error message a bit more explicit for the lamba user like 'File size is too big', and put the full error message in some debug info.

        Gliffy Diagrams


            Issue Links



                • Votes:
                  0 Vote for this issue
                  1 Start watching this issue


                  • Created: