Talk:Web services files handling: Difference between revisions
From MoodleDocs
(Created page with "=Proposal for sending file from the client to Moodle = 1- The client call webservice/pluginfile.php The client send the FILES by HTTP calling webservice/upload.php with the web ...") |
|||
Line 1: | Line 1: | ||
=Proposal for sending file from the client to Moodle = | =Proposal for sending file from the client to Moodle = | ||
1- The client | 1- The client calls webservice/pluginfile.php | ||
The client | The client sends the FILES by HTTP calling webservice/upload.php with the web service token. | ||
The upload script | The upload script stores the files in a draft area. It send back the draft aera id to the client in JSON format. | ||
2- The client calls the web service function. It send as | 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 | 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. |
Revision as of 03:57, 3 January 2013
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.
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.