Class AttachmentsApiV2Controller
This controller enables the API consumers to handle email attachments which can be later used in emails. The most common scenario is that if an email has attachments, they must be already uploaded before the email is sent.
category |
System |
---|---|
package |
ApiV2Controllers |
__construct(\Slim\Slim $api, array $uri)
Call this constructor from every child controller class in order to set the Slim instance and the request routes arguments to the class.
deprecated |
The "__initialize" method will is deprecated and will be removed in a future version. Please use the new "init" for bootstrapping your child API controllers. |
---|---|
Throws |
|
\Slim\Slim
Slim framework instance, used for request/response manipulation.
array
This array contains all the segments of the current request, starting from the resource.
__initialize()
getCallableResource( $controller, array $mappedURI, \Slim\Slim $api)
array
\Slim\Slim
post()
apiVersion |
2.1.0 |
---|---|
apiName |
UploadAttachments |
apiGroup |
Emails |
apiDescription |
If an email contains an attachment this must be uploaded before the email is sent. This method accepts the upload of one file at a time. It will return its temporary path which can be used as the attachment path in the email JSON data. The name of the file form field is not taken into concern (can be whatever). The important rule is that only one file will be uploaded at a time. |
apiExample |
{curl} Upload Attachment curl --user admin@shop.de:12345 -F name=test -F filedata=@localfile.jpg http://shop.de/api.php/v2/attachments |
apiSuccessExample |
{json} Success-Response { "code": 201, "status": "success", "action": "upload", "path": "/var/www/html/uploads/tmp/myfilename.txt" } |
DEFAULT_PAGE_ITEMS
var |
---|
DEFAULT_CONTROLLER_NAME
var |
---|
DEFAULT_RATE_LIMIT
var |
---|
DEFAULT_RATE_RESET_PERIOD
var |
---|