Quantcast
Channel: Web services
Viewing all articles
Browse latest Browse all 2361

Add a resource using a custom web service

$
0
0
by John Roche.  

Hi all,

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.

  1. I need to get access to the file from my web service plugin
  2. 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?


Viewing all articles
Browse latest Browse all 2361

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>