Nice, thx. Just want to add, that when using boot() to register the new type like Jeppe proposed, it helps to surround the whole type registration with
if(!Type::hasType('longblob'))
{
[...]
}
or else executing
app/console cache:clear
will tell you, that the type already exists; at least in Symfony 2.0.11. For some reason boot() is called twice.
But can you tell me the rationale behind using base64_encode() and base64_decode()? Tried it without and it works for me. As far as I know BASE64 bloats the file up by about 33 %.