|
|
|
Forum Member
      
Group: Forum Members
Last Login: 2011-12-22 17:31:00
Posts: 34,
Visits: 620
|
|
I need a mechanism to attach arbitrary content to Eco objects in my model - e.g. images, video clips, rich text etc.
This would allow the user to select any document or documents to be attached to an object. The attachments wwillbe stored in the database. The application would then need a means of determining the type of the attached document to allow the document to be displayed.
Has anyone done this in Eco, or can anyone provide me with some advice on how to go about it?
Thanks,
Dave
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: 2011-11-23 02:03:59
Posts: 80,
Visits: 730
|
|
| I have done a few ECO III projects with these kind of attachments successfully using the BLOB fields and SQL 2005. I have created additional fields for storage of filename and size for reference. BTW, I have also read somewhere else that .NET remoting is not so good at transferring large files (>2MB?) and wonder if ECO would deal with it automatically?
|
|
|
|
|
Supreme Being
      
Group: Administrators
Last Login: 2010-11-30 12:17:13
Posts: 1 230,
Visits: 1 382
|
|
I would suggest adding a new class "Attachment" with a blob-property that will contain the byte-stream, and a MimeType property to indicate the type of the content. Additional properties for filename/length/datetime is optional.
ECO uses .net remoting if you use a PersistenceMapperClient on your EcoSpace, We haven't made any specific performance tests with large sets of data. When transporting the data from the remote PersistenceMapper, a blob will be transferred as a .net serialization of the byte array (byte[]). If you use a PersistenceMapperSharer instead, the only network transfer of the blob will be inside the SqlConnection/SqlCommand (or corresponding if you use another db than sqlserver), and I don't see how we could easily avoid that one...
/Jonas Hogstrom [CapableObjects]
|
|
|
|
|
Forum Member
      
Group: Forum Members
Last Login: 2011-12-22 17:31:00
Posts: 34,
Visits: 620
|
|
| Thanks William and Jonas.
|
|
|
|