if you want change length in 1.5 you need change in database varchar length (for example to 128) of column file_name in table {prefix}_attachment
next what you need to do is change two value in:
\controllers\admin\AdminProductsController.php
if (!Validate::isGenericName(Tools::getValue('attachment_name_'.(int)($language['id_lang']))))
$this->errors[] = Tools::displayError('Invalid Name');
elseif (Tools::strlen(Tools::getValue('attachment_name_'.(int)($language['id_lang']))) > 32)
$this->errors[] = sprintf(Tools::displayError('Name is too long (%d chars max).'), 32);
if (!Validate::isCleanHtml(Tools::getValue('attachment_description_'.(int)($language['id_lang']))))
$this->errors[] = Tools::displayError('Invalid description');
find this code and edit line with value set to 32 to value you have defined in database in my case there are line 371 and 372
after that open file \classes\Attachment.php
and change line 51
'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 32)
with this same value as before in database and previous file