Skip to main content


 

Symptoms

 


Many of our companies current processes have files on network drives. I believe we are working on finding a better file management system. We know K2 works with SharePoint. I think we can also store files in a SQL server database, though performance would be affected. Can K2 work with windows file systems? For example, when a certain form with a file attachment is submitted, execute the create method on the O: smart object which has fields for the file, file name, file path, etc.
 

 

Diagnoses

 

N/A
 

 

Resolution

Currently this functionality does not exist ootb, but perhaps the Community broker/project below can achieve your requirement:

http://community.k2.com/t5/K2-blackpearl/File-Service-Broker/ba-p/65536

Please note as this broker was not developed by K2, it is not supported by K2 Support but perhaps the developer listed for this broker can assist with any queries.

Out-of-the-box, K2 will store a file as an XML structure with the file’s name and a Base64 encoding of this file "usually in an nvarchar(max) column" field in the database. This behavior can be exhibited when creating perhaps a Smartbox Smartobject with the 'File' type.

Reversely, when creating a SQL server service instance a 'nvarchar(max)' field will map to the default 'memo' Smartobject field. You will need to remap this nvarchar(max) field to the 'File' Smartobject type such that the Smartforms Attachment control can handle the 'File' type successfully.

The actual file will be stored as a Base64 encoded string within this XML structure and is stored within the database. It will have the format below:


<file>
<name>somefile.txt</name>
<content>UEsDBBQIAAgCEAAAA3jgAAAAA</content>
</file>

 

 



 
Be the first to reply!

Reply