web services downloading file

Re: web services downloading file

by Json Chau -
Number of replies: 0

The first, you must call core_course_get_content, this function will return a fileurl like this : 

http://<yoursite>/webservice/pluginfile.php/37/mod_resource/content/1/myfile.pdf?forcedownload=1

Next, you add a token as following

http://<yoursite>/webservice/pluginfile.php/37/mod_resource/content/1/myfile.pdf?forcedownload=1&token=6a18222af87608fe4d2ab2ca7ab1f49a