Use real BLOB instead of Base64. Need a lot of refactoring