0

I really enjoy Restler3, but now there is a problem. I want to POST a ZIP file to the server. Just by a simple HTML-Form. To enable the upload if have to add

$restler->setSupportedFormats('UploadFormat');

But if do that all the JSON-GET-Requests just won't work.

Fatal error:  Uncaught exception 'Luracast\Restler\RestException' with message 'UploadFormat is read only…

That's the error-message. What should I do to fix that?

1 Answers1

0

I also had this problem. Changing my code to this worked:

$r->setSupportedFormats('UploadFormat','JsonFormat');
Undo
  • 25,519
  • 37
  • 106
  • 129
zhangjun
  • 51
  • 8