As the title states I am trying to add a resource using a custom web service.
At the moment I am sending a .zip file to my moodle site which contains a set of files and directories. I am using the /moodle/webservice/upload.php endpoint. This gets my file to the user private repository in Moodle. I now want to use this file to create a resource.
- I need to get access to the file from my web service plugin
- Create a resource using the unzipped file
I have been trying to follow the drag and drop upload code but how they access the file is different to my implementation github.com/moodle/moodle/blob/master/course/dnduploadlib.php#L438
Can anyone give me some advice on how to access the file and how to create the resource?