Skip to main content


 

Symptoms


In previous versions of K2, when the user opens the dialog and selects the file to upload, the file was being temporarily stored in a designated folder at C:Program Files (x86)K2 blackpearlK2 smartforms RuntimeFiles temporarily. They are no longer stored here, because now it uses IsolatedStorage temp files located at C:ProgramDataIsolatedStoragec22zc51y.xitdf32z03.o0sStrongName.sv3o0piwfpl3mmnmzxoxnb4xggpgeagcAssemFiles..temp.

The older versions of K2 would give the entire path on disk when exporting the control to XML so that we could locate the file to upload to a document management system with ease. The problem is that the filepath the control XML now gives is simply .. This is not enough information to locate this file on disk.
 

Diagnoses


The Attachment handling system of smartforms has been changed in 4.6.9 as you described. The system could also be changed in the future version as well. If you could avoid depending on the internal system, that would be benefit for you in the long term. The current Files location is a temporary cache (it’s cleared every few minutes) and it is used to stream files temporarily while interacting with SmartObjects containing Files and Image properties. (Both for uploading, creating, reading and updating single records plus for list executions (as needed))

Using the web server file system is actually also architecturally limiting because you cannot use it simply in a load balanced environment without other file synchronization techniques. (The request may come to server 2 whilst the file lies on server 1’s disc.)

The file upload control works with a SmartObject and the SmartObject will store it as per SmartObject Service implementation.
 

Resolution

The right and future proof way to handle this issue is to write/use a SmartObject FileSystem Service (or a service for whatever system the file will be stored in) and use the File/Image property from that ServiceObject in your SmartObject.

Another option is to not store the files in SmartObjects and use a totally unrelated system, with only references stored in the relevant SmartObjects.




 

Is there a way to configure this temporaily path to store on the 😨 ?

What's the mechanism in which the orphaned temp files are cleaned up?


We have the same issue. Any ideas on how this can be solved? Shared folders?


We have used mklink to create a symbolic link to one server. You will need to delete the C:ProgramDataIsolatedStorage on one server, and create the symbolic link to the other. 

 

http://www.sevenforums.com/tutorials/278262-mklink-create-use-links-windows-3.html

 

 


Reply