Talk:Web services files handling
Proposal for sending file from the client to Moodle
1- The client calls webservice/pluginfile.php
The client sends the FILES by HTTP calling webservice/upload.php with the web service token.
The upload script stores the files in a draft area. It send back the draft aera id to the client in JSON format.
The files, that a user can send, have the same restriction (number of files, max size...) as if the user were using the web interface.
2- The client calls the web service function. It send as many draft area ids that are requested by the web service function.
Note: in Moodle web service structure, we need to add a new param for draft id when dealing with textarea/description/introeditor.
Texts sent by the client should contain @@pluginfile....@@ strings to reference the files.