Exposing a webservice where a filedocument can be uploaded

1
I have a webservice exposed where the party that consumes the webservice uploads a filedocument. I presumed that the allowed file size would be the same as when configured in the form upload. But it seems this is not the case. A 2.5 MB files gives a com.sun.xml.ws.client.ClientTransportException: The server sent HTTP status code 413: Request Entity Too Large . Why is this happening? Am I missing something in the configuration? How large can a file be when exposing a webservice? Regards, Ronald
asked
2 answers
5

the default 5MB limit for a file document is only checked when using the file upload control. If you use a webservice or another mechanism the file size isn't checked by mendix.

If you are running in the mendix cloud : This seems to be a configuration thing for the nginx webserver, mendix needs to change the clientmaxbody_size property i think?

answered
2

Note that sending a file trough a webservice request will cause it to be base64encoded, which means that the actual amount of data to be transferred is 4 times larger than the original size of the file. So your 2.5 mb file needs a maxbody size of 10mb in your nginx environment.

(In other words: Sending filedocs via webservices is very inefficient and CPU intensive)

answered