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

Displaying "plugin files" publicly

$
0
0
by Doug Henner.  

Dear All,

on our Moodle - site (Moodle 3.5, adaptable theme) I want to make some videos from Moodle visible for the public. For example we have a short uploaded video like e.g.  

moodledomain.com/pluginfile.php/1734/mod_glossary/entry/235/examplevideo.m4v 


that one I want to present for the not logged-in user on the front page.


So i created a web service "publicvideos".


... enabled "File upload" as well as "moodle/course:managefiles:" for that service.


... added Function "core_files_get_filesbrowse moodle files" for that service

... created a token. For trial purposes I chose an admin user with administer privileges 

    as service I chose "publicvideos"

    assume the token is "123456789"

... activated REST as well as XML-RPC protocol


So I changed the url above to


moodledomain.com/pluginfile.php/1734/mod_glossary/entry/235/examplevideo.m4v?token=123456789



I expected to download examplevideo.m4v by that link but still getting:


error"Access Control Exception"

errorcode"accessexception"

stacktracenull

debuginfonull

reproductionlinknull



As I said I want to display the video on that start page. Is that basically the right way ?

If yes can you tell what is wrong / missing ?


Thanks a lot !


Best,


Doug



Viewing all articles
Browse latest Browse all 2361

Trending Articles



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