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key; $args['status'] = true; } return $args; } /** * Remove an attachment from storage * This is triggered by the remove attachment button on the compose screen */ function remove($args) { parent::remove($args); $this->_load_drivers(); $status = $this->cache->remove($args['id']); if (!$status && $this->mem_cache) { $status = $this->cache->remove($args['id']); } // we cannot trust the result of any of the methods above // assume true, attachments will be removed on cleanup $args['status'] = true; return $args; } /** * When composing an html message, image attachments may be shown * For this plugin, $this->get() will check the file and * return it's contents */ function display($args) { return $this->get($args); } /** * When displaying or sending the attachment the file contents are fetched * using this method. This is also called by the attachment_display hook. */ function get($args) { // attempt to get file from local file system $args = parent::get($args); if (!empty($args['path']) && ($args['status'] = file_exists($args['path']))) { return $args; } $this->_load_drivers(); // fetch from database if not found on FS $data = $this->cache->get($args['id']); // fetch from memcache if not found on FS and DB if (($data === false || $data === null) && $this->mem_cache) { $data = $this->mem_cache->get($args['id']); } if ($data) { $args['data'] = base64_decode($data); $args['status'] = true; } return $args; } /** * Delete all temp files associated with this user */ function cleanup($args) { $this->_load_drivers(); $group = $args['group'] ?? null; if ($this->cache) { $this->cache->remove($group, true); } if ($this->mem_cache) { $this->mem_cache->remove($group, true); } parent::cleanup($args); $args['status'] = true; return $args; } }