RADactive I-Load 2009.R1
I-Load temporary files
See Also
Getting started > I-Load temporary files

Glossary Item Box

By default, when an image is uploaded or edited with I-Load, the component saves the file in a temporary directory.

It is the application’s job to save these files in a database or within a directory in the file system through one of these methods:


[Box 1]

If the files are not saved to a database or file system, by default they will automatically be deleted.

When an image that has already previously been saved in a database or file system is edited, I-Load places a copy in the temporary directory and modifies the temporary files.

If the image is not saved again to a database or file system, the changes made will be lost.


Default temporary folder

I-Load allows to configure the default temporary folder path inside the application Web.Config file.
Please see Web.Config file settings

If the I-load default temporary folder is not explicitly set within the Web.Config file, then:

  • For Asp.Net Full Trust environments, I-Load uses the system’s temporary directory (System.IO.Path.GetTempPath).
  • For Asp.Net Medium Trust environments, I-Load uses the application’s “~/App_Data” directory

The default temporary file directory must (whether it is set up manually or not) have the necessary read-write permissions:

See also File permission settings

If I-Load is used in a multi-worker process environment (for example, Microsoft IIS Web Gardens or multiple Servers within a Web Farm) it is essential to manually configure the I-Load default temporary file directory.
The directory you decide to use must be accessible by every worker-process (for example, a Network Share).
See also Using I-Load in a multiple worker-process environment.

 

How to configure the path for the temporary directory of an I-Load instance

By default every I-Load instance store temporary files into the default temporary folder.

You can configure an I-Load instance to use a different temporary directory

Example:

Temporary folder path configuration Copy Code
ILoad1.Configuration.ManualTemporaryFolder = true;
ILoad1.Configuration.TemporaryFolder.Path = @"c:\MyTemporaryFolder";

The temporary file directory must have the necessary read-write permissions:

See also File permission settings

If I-Load is used in a multi-worker process environment (for example, Microsoft IIS Web Gardens or multiple Servers within a Web Farm) then the directory you decide to use must be accessible by every worker-process (for example, a Network Share).
See also Using I-Load in a multiple worker-process environment.

 

When temporary files are deleted

The temporary files generated by I-Load can be deleted in the following cases:

 

How to configure I-Load to automatically move the temporary files to another directory at the end of the upload procedure

You can configure I-Load to automatically move uploaded image files to a directory.

This option is useful if, for example, I-Load is inserted into an HTML WYSIWYG editor and all images uploaded by the user need to be saved in a certain directory.

For example, this code:

Copy Code
ILoad1.Configuration.OnCompleteBehavior = WebFileUploadOnCompleteBehavior.MoveFilesToDestinationFolder;
ILoad1.Configuration.DestinationFolder.Path = @"c:\MyDestinationPath";

Allows I-Load to be configured to automatically save uploaded images in the directory "c:\MyDestinationPath".

When the WebFileUploadOnCompleteBehavior.MoveFilesToDestinationFolder" option is used, the file name is automatically generated by I-Load and it is not possible to set it by programming it.

If you wish to have control over the name of the saved file, you need to use the (default) mode WebFileUploadOnCompleteBehavior.KeepFilesInTemporaryFolder" and then use one of the methods mentioned in box 1.

Moreover, given that the "WebFileUploadOnCompleteBehavior.MoveFilesToDestinationFolder" mode makes it so that any image uploaded by the user is saved, the use of this option may require a large amount of disk space.

 

See Also

Copyright © RADactive srl 2010 - All Rights Reserved.