Hello fellow developers
I am coding a video repository plugin to a Media Server I made. ( actually, A fellow developer made)
It works very well when I am getting media (video) files off the Media server into Moodle.
But now, I wish to let users upload their local video files directly into the Media server from within the Moodle's repository plugin interface (and not have them open up a new window. login into the Media server. upload a file. go back to Moodle. refresh and choose that file) and have the file automatically selected and used within Moodle.
I have read the repository API documentation and read through all the relevant repository classes (the code) examined all the repository/*/lib.php of each core plugin. non seems to have that kind of functionality. (to the best of my understanding)
I have tried to add some upload functionality within the scope of the current API (functions) and AJAX limitation. but i can not figure it out.
I would really appreciate some advise
as far as I know the repositories are used to retrieve information not to upload any content. Another area which provides this kind of functionnality is portfolio.
If you are willing to allow your users to upload a video directly from the filepicker to the remote server, you might want to have a look at the upload repository. Perhaps uploading the content, saving it in the filearea and then pushing it to the media server would work.
Although, I am not entirely convinced that this is the proper way of implementing such a feature. You could maybe work out a local plugin which grabs a video through a moodle_form and then pushed it. You'll probably still have to use the filearea for local storage (temporary or not).
Let us know how it goes!