ERAttachment Framework
Tutorial Project and Screencast
I have created a small tutorial video to describe the simplest configurations of ERAttachment framework. Hopefully once you get your feet wet, the additional configurations possible won't be so daunting. See the Official ERAttachment Package Summary/Overview
http://wocommunity.org/podcasts/ERAttachment-Tutorial.mov
The tutorial video refers to the following application that demonstrates how to use the ERAttachment Framework to store a Person entity's photo.
Using ERAttachment with ERModernLook (ERD2W)
There are a few notes on using D2W components with ERAttachment on this page:
Oracle and ERAttachment Table Creation
If you are using Oracle with ERAttachment, the table creation will fail because one of the attributes is called "size" and this is a reserved word in Oracle DB. To fix that problem, add this to your Properties :
er.extensions.ERXModelGroup.ERAttachment.size.columnName=attachmentSize
If you want to use ERAttachment without using ERXApplication, you need to register the request handler in your Application class with :
ERAttachmentPrincipal.sharedInstance(ERAttachmentPrincipal.class).finishInitialization();
MySQL and ERAttachmentData BLOB size
The prototype for ERAttachmentData.data is 'blob', and the blob proto for MySQL is BLOB when it should really be LONGBLOB. In MySQL a BLOB is on 65K+, a MEDIUMBLOB is up to 64MB and a LONGBLOB is up to 4GB. FrontBase, for example, has only one type, BLOB for binary large objects and it is defined as 4GB (432 bytes). So if you don't want to think about it, then use LONGBLOB in MySQL. If you want to limit the size of what someone can upload and 64MB is the biggest attachment you ever want to be accepted into the database, use MEDIUMBLOB.
Changing the migration-generated tables is easy, for example:
ALTER TABLE ERAttachmentData MODIFY data MEDIUMBLOB;
or
ALTER TABLE ERAttachmentData MODIFY data LONGBLOB;