On Tue, 28 Apr 2020 at 23:20, K. Kamhamea <kamha...@googlemail.com> wrote:
>
> Does the file upload with moodle really work? I doubt so, as header and body 
> in my requests look almost the same no matter which software I use to 
> generate it.

Yes

>
> Is it possible that it depends on the content of the fileDTO? What fields are 
> required in that structure.

No

>
> Also can I turn some debug on, so the server will print more detailed 
> information about the cause of the error?

Yes
Please search ML archives :)

>
> Am Di., 28. Apr. 2020 um 14:42 Uhr schrieb Maxim Solodovnik 
> <solomax...@gmail.com>:
>>
>> Please check sources for moodle plugin
>>
>> On Tue, Apr 28, 2020, 19:06 K. Kamhamea <kamha...@googlemail.com> wrote:
>>>
>>> Has anyone successfully used file upload with WebServices. I always get an 
>>> HTTP 415 error.
>>> And of course I used headers
>>>
>>> 'Content-type': "multipart/form-data"
>>>
>>>
>>> There is a discrepancy in the documentation.
>>> While
>>> http://openmeetings.apache.org/openmeetings-webservice/apidocs/org/apache/openmeetings/webservice/FileWebService.html
>>> says there are 3 parameters necessary
>>> The xml documentation lists only two sid and stream
>>>
>>>    <resource path="/file">
>>>       <method name="POST">
>>>          <request>
>>>             <param name="sid" style="query" type="xs:string" />
>>>             <representation mediaType="multipart/form-data">
>>>                <param name="stream" style="query" type="xs:anyType" />
>>>             </representation>
>>>          </request>
>>>          <response>
>>>             <representation mediaType="application/json" />
>>>          </response>
>>>       </method>
>>>
>>> Also the parameter name 'steam' is not accepted at all, as I get an 400 or 
>>> 500 error. If I send the stream by the name 'file', as usual, I get 415.
>>>
>>> Unfortunately the catalina.out file doesn't report much more information.
>>>
>>>
>>>


-- 
Best regards,
Maxim

Reply via email to