$ext = $y->toExt(trim((string) $this->mimetype ));
$this->filename = empty($this->filename) ?
- ('image-upload-' . date('Y-m-d H:i:s') . '.' . $ext) : ($this->filename .'.'. $ext);
+ ('image-upload-' . date('Y-m-d H:i:s') . '.' . $ext) : ($this->filename);
if (!$this->createFromData($data)) {
return false;