Moodle
  1. Moodle
  2. MDL-30774

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

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor 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:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Rank:
      33706

      Description

      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.

        Issue Links

          Activity

          Hide
          Jérôme Mouneyrac added a comment -

          This issue was assigned to me automatically, however I will not be able to work on this issue in the immediate future. In order to create a truer sense of the state of this issue and to allow other developers to have chance to become involved, I am removing myself as the assignee of this issue.
          For more information, see http://docs.moodle.org/dev/Changes_to_issue_assignment

          Show
          Jérôme Mouneyrac added a comment - This issue was assigned to me automatically, however I will not be able to work on this issue in the immediate future. In order to create a truer sense of the state of this issue and to allow other developers to have chance to become involved, I am removing myself as the assignee of this issue. For more information, see http://docs.moodle.org/dev/Changes_to_issue_assignment

            People

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

              Dates

              • Created:
                Updated: