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

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

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • 2.1.3, 2.2, Future Dev
    • Web Services
    • MOODLE_21_STABLE, MOODLE_22_STABLE

      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.

            Unassigned Unassigned
            jerome Jérôme Mouneyrac
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.