[Kde-imaging] [Bug 104204] Add Support for Coppermine Remote Access API

Abbas Ali abbasali1 at gmail.com
Sat Aug 13 08:21:32 CEST 2005


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=104204         




------- Additional Comments From abbasali1 gmail com  2005-08-13 08:21 -------
As an example I am posting the html form need to submit the query to the api. The form below is used for uploading a new picture.

<form enctype="multipart/form-data" action="http://www.mysite.com/cpg/api/" method="POST">
<table border="0" cellpadding="5">
  <tr>
    <td>Album Id: </td>
    <td><input name="aid" type="text" size="5" /></td>
  </tr>
  <tr>
    <td>Picture to be uploaded: </td>
    <td><input name="file" type="file" /></td>
  </tr>
  <tr>
    <td>Username: </td>
    <td><input name="username" type="text" size="25" /></td>
  </tr>
  <tr>
    <td>Password: </td>
    <td><input name="password" type="password" size="25" /></td>
  </tr>
  <tr>
    <td>Title: </td>
    <td><input name="title" type="text" size="35" /></td>
  </tr>
  <tr>
    <td>Description: </td>
    <td><textarea name="description"></textarea></td>
  </tr>
  <tr>
    <td>Keywords: </td>
    <td><input name="keywords" type="text" size="35" /></td>
  </tr>
  <tr>
    <td colspan="2" align="center">
      <!-- The function to be used -->
      <input name="function" type="hidden" value="cpgAPI.upload" /><br />
      <input type="submit" value="Send File" />
    </td>
</form>

When an upload is successful, the following xml is returned:

<?xml version="1.0" encoding="utf-8" ?>
<uploader>
        <status>ok</status>
        <pid>14</pid>
</uploader>

...where pid is the new id of the photo.

When an upload fails, the following xml is returned:

<?xml version="1.0" encoding="utf-8" ?>
<cpg>
        <status>fail</status>
        <error>1</error>
        <verbose>invalid login details</verbose>
</cpg>

... where error is the error code.


Similarly the cpgAPI.catList function works in which we need to post the category id (cat), username (username), password (password) and function to be used (function) i.e cpgAPI.catList.


More information about the Kde-imaging mailing list