Make save() method less memory consumptive, do not return attachment body

pull/106/head
Aleksander Machniak 11 years ago
parent c58cb8aa95
commit cccf8a5b08

@ -126,11 +126,12 @@ class redundant_attachments extends filesystem_attachments
$this->_load_drivers(); $this->_load_drivers();
if ($args['path']) $data = $args['path'] ? file_get_contents($args['path']) : $args['data'];
$args['data'] = file_get_contents($args['path']);
unset($args['data']);
$key = $this->_key($args); $key = $this->_key($args);
$data = base64_encode($args['data']); $data = base64_encode($data);
$status = $this->cache->write($key, $data); $status = $this->cache->write($key, $data);

Loading…
Cancel
Save