(Created page with '== Sample plugin: FileSize (adding new server side command - complete example) == ==== Introduction ==== Probably the best way to learn new things is to write a code, so let's wr…') |
|||
Line 7: | Line 7: | ||
The FileSize plugin should provide a new command named "FileSize", in other words, calling: | The FileSize plugin should provide a new command named "FileSize", in other words, calling: | ||
<pre> | <pre> | ||
− | /ckfinder/core/connector/ | + | /ckfinder/core/connector/{{{ext}}}/connector.{{{ext}}}?command=FileSize&type=Files¤tFolder=%2F&fileName=foobar.jpg |
</pre> | </pre> | ||
(assuming that foobar.jpg exists) | (assuming that foobar.jpg exists) |
Revision as of 09:14, 25 May 2010
Sample plugin: FileSize (adding new server side command - complete example)
Introduction
Probably the best way to learn new things is to write a code, so let's write a plugin that adds a new server side command to the connector. We'll create a command that returns a size of a given file.
The FileSize plugin should provide a new command named "FileSize", in other words, calling:
/ckfinder/core/connector/{{{ext}}}/connector.{{{ext}}}?command=FileSize&type=Files¤tFolder=%2F&fileName=foobar.jpg
(assuming that foobar.jpg exists) should return a valid XML response:
<Connector resourceType="Files"> <Error number="0"/> <CurrentFolder path="/" url="/ckfinder/userfiles/files/" acl="255"/> <FileSize size="5647"/> </Connector>