function beforeInsert($q, $roo)
{
if (isset($q['_remote_upload'])) {
- print_r($q);
require_once 'System.php';
static $tmpdir = false;
if (!$tmpdir) {
}
$path = $tmpdir . '/' . basename($q['_remote_upload']);
- $fetch = false;
if(!file_exists($path)){
- $fetch = true;
// use HTTP_Request
file_put_contents($path, file_get_contents($q['_remote_upload']));
}
}
if (!$this->createFrom($path)) {
- $roo->jerr("erro making image" . $q['_remote_upload'] . "??? " . ((int) $fetch));
+ $roo->jerr("erro making image" . $q['_remote_upload']);
}
$roo->addEvent("ADD", $this, $this->toEventString());