API call example:
XML
<?xml version="1.0" encoding="UTF-8"?>
<methodCall>
<methodName>mailkit.filemanager.upload</methodName>
<params>
<param>
<value>
<int>client_id</int>
</value>
</param>
<param>
<value>
<string>client_md5</string>
</value>
</param>
<param>
<value>
<array>
<data>
<value>
<struct>
<member>
<name>folder_name</name>
<value>
<string></string>
</value>
</member>
<member>
<name>name</name>
<value>
<string>name.gif</string>
</value>
</member>
<member>
<name>data</name>
<value>
<string>YXNhc2FzYXN=</string>
</value>
</member>
<member>
<name>description</name>
<value>
<string>description</string>
</value>
</member>
</struct>
</value>
</data>
</array>
</value>
</param>
</params>
</methodCall>
Values
client_id * = client ID can be found in your Mailkit account's menu Profile/Integration.
client_md5 * = MD5 code can be found in your Mailkit account's menu Profile/Integration.
folder_name = name of folder. Empty value = file will be uploaded to the root.
name * = name of file (max. 50 characters)
data * = data of file(Base64)
description = description of file
* required value
Succesfull call response:
XML
<?xml version="1.0" encoding="utf-8"?>
<methodResponse>
<params>
<param>
<value>
<array>
<data>
<value>
<struct>
<member>
<name>ERROR</name>
<value>
<i4>0</i4>
</value>
</member>
<member>
<name>NAME</name>
<value>
<string>name.gif</string>
</value>
</member>
<member>
<name>NAME_ORIG</name>
<value>
<string>name.gif</string>
</value>
</member>
<member>
<name>ID_FOLDER</name>
<value>
<i4>0</i4>
</value>
</member>
<member>
<name>ID_FILE</name>
<value>
<i4>12345</i4>
</value>
</member>
</struct>
</value>
</data>
</array>
</value>
</param>
</params>
</methodResponse>
Values
ERROR = possible values:
- 0 = without errors
- 1 = not allowed file extension (exe, com, bat, pif, reg, dll)
- 2 = ID_folder not found / invalid folder_name (file will be uploaded to the root)
- 3 = data of file is missing
- 4 = name of file is missing
- 5 = file was renamed (due duplicated name)
NAME = file name (when ERROR = 5 = it is the new name)
NAME_ORIG = file name (originally)
ID_FOLDER = ID of folder, 0 = root
ID_FILE = ID of uploaded file