CRM_Core_Page_AJAX_Attachment
class CRM_Core_Page_AJAX_Attachment
CRM_Core_Page_AJAX_Attachment defines an end-point for AJAX operations which upload file-attachments.
To upload a new file, submit a POST (multi-part encoded) to "civicrm/ajax/attachment". Inputs: - POST['entity_table']: string - POST['entity_id']: int - POST['attachment_token']: string - FILES[*]: all of the files to attach to the entity
The response is a JSON document. Foreach item in FILES, there's a corresponding record in the response which describes the success or failure.
Note: The permission requirements are determined by the underlying Attachment API.
Constants
ATTACHMENT_TOKEN_TTL |
|
Methods
static
attachFile()
(Page Callback)
static array
_attachFile(array $post, array $files, array $server)
No description
static
sendResponse(array $result)
No description
static string
createToken()
No description
static bool
checkToken(string $token)
No description
Details
at line 50
static
attachFile()
(Page Callback)