Uploading files in a forum with a Web Service in Moodle
<p>I need to upload files into a forum in moodle through <strong>Web Services</strong>, I have been searching and I found that exist a WS called <code>core_files_upload()</code>. I looked at the code of this WS and the context level of this WS is only (<em>block, course, coursecat, system, user or module</em>), the context forum not exist and this WS is <code>deprecated</code>. </p>

<p>I also found that in Moodle 3.0 there are 2 new WS related to forums, they are <strong>mod_forum_add_discussion</strong> and <strong>mod_forum_add_discussion_post</strong> but I also looked at the code and they don't allow upload.</p>

<p>Then I decided that the best solution would be to create a new one, but I don't know much about uploading files in <strong>Moodle</strong> and can't find much information. I'm a little bit familiar with the structure of the WS in Moodle because I have made 2 very simple WS but I don't know how to do this.</p>

<p>If anyone knows how to do it or have any examples or documentation that may be useful, it would be helpful.</p>

<p>Thanks in advance.</p>