Skip to content
kvz edited this page Sep 14, 2010 · 3 revisions

The following is a preliminary attempt to address some frequently asked questions. Feel free to add others for us to answer.

Can I do a "mass" add or edit with your plugin?

Yes you can. In my CakePHP app I've implemented a public function store() {} in my controllers. I post data to it in the following format:

json

servers {
 0: {
  hostname: 'www01.example.com'
 },
 1: {
  hostname: 'www02.example.com'
 }
}

And do a saveAll with cake.

xml

The XML variant would be:

<servers>
 <item>
  <hostname>
   www01.example.com
  </hostname>
 </item>
 <item>
  <hostname>
   www02.example.com
  </hostname>
 </item>
</servers>

If you need more client side examples, you could look at my company's client-side class over at true-api. It's smoothens working with this this plugin as it offers end-users an object oriented way of talking to it.

Is it possible to use your plugin with file uploads?

base64_encode is the way to fly. Encode it client side, then if your webserver + php allow big POSTs, you could base64_decode a field when it reaches your CakePHP app.