public $registerMediaConversionsUsingModelInstance = true;
- protected static $_doctrineTypesMapping = ['int' => 'integer','longtext'=>'text'];
+ protected static $_doctrineTypesMapping = ['int' => 'integer', 'longtext' => 'text'];
protected $connection = null;
protected $primaryKey = 'id';
return $f->filterValue($value);
}
+ protected function _randCollectionName($fieldname)
+ {
+ return str_replace('e', 'a', substr(hash('sha256', uniqid($fieldname, true)), 0, 10));
+ }
+
/**
* @param string $fieldname
* @param string|\Symfony\Component\HttpFoundation\File\UploadedFile $filepath
if ($field->getAttribute('name_as_collection', false)) {
$collection = $fieldname;
} else {
- $collection = substr(hash('sha256', uniqid($fieldname, true)), 0, 10);
+ $collection = $this->_randCollectionName($fieldname);
}
$this->setAttribute($fieldname, $collection);
$save = true;