Portal Engine
Version 3.x > Portal Engine > Versioned document - attachment problem View modes: 
User avatar
Member
Member
proto84 - 12/15/2008 3:36:38 AM
   
Versioned document - attachment problem
Hi,
I have a problem with versioned documents in kentico. Without versioning everything was ok - in Attachment table an AttachmenBinary field was NULL and files were stored on hard disc.

After enabling workflow of this document type, files are stored in database in AttachmentHistory table and binaries of these files are in AttachmentBinary field - which in my opinion is incorrect, because i have checked "Store Files In File System" and unchecked the "Store Files In Database" checkbox in configuration .

After publishing versioned document, Kentico creates antry in Attachment table, writes file on disc but still reads data from AttachmentHistory table (i've checeked it twice) and doesn't use file on disc at all - it uploads file to user from database.

Is there any way to force kentico to store and read attachments of versioned documents in/from file system?

User avatar
Kentico Developer
Kentico Developer
kentico_zbysekn - 12/16/2008 9:12:52 AM
   
RE:Versioned document - attachment problem
Hello,

Thank you for your message.
If you check Store Files In File System, Redirect files to disk, uncheck Store Files In Database and fill Files folder in Files settings under SiteManager, it should fit your needs.
The example of how to testmthat files are read from file system instead of DB.

Example scenario:
1) add workflow to some document type
2) create document with attachment (image file for example)
3) use it in any transformation so it will be displayed on your site
4) publish document (file will be stored on your disk )
5) delete file from disk

If you use the settings I have described, the file won't be displayed on your site anymore, because it's removed from hard disk.
But if you will inspect form tab of related document you will be able to see this document, because these are information from versioning which you can use to get back to previous version. But this information isn’t used when user browse through the site, so I think it's working correctly.

Best Regards,
Zbysek Nemec