Problem with function core_files_upload

Re: Problem with function core_files_upload

by Connor Dougan -
Number of replies: 0

For those curious, to expand the error message you have to log into the moodle server as an admin and go to 

where you can change debugger messages to developer to find out more.

In this particular context, I need to either include contextid or the two parameters contextlevel and instanceid.

Since I want to upload to a user's draft area I would set contextlevel = 'user' and instanceid = $userid (which can be obtained via other methods).

I hope this helps someone!