CodeCharge Studio

TemporaryFolder Run-Time Property (ASP)

Applies to

FileUpload Control

Type

string

Access

read/write

Syntax

object.TemporaryFolder [=value]

Description

This property specifies the temporary directory the uploaded file will be stored into before being moved to the target directory defined in FileFolder property.

This property may be changed if some specific conditions happen. For instance, if there is not enough space in the default temporary directory, the alternate location can be used.

Note: The value for the property is set only if the pointed folder exists. Absolute filesystem paths should be used to avoid context ambiguities.

Examples

The following example checks if the uploaded file is bigger than 1MB and selects the temporary folder depending on this condition.
This code assumes Form1 form exists and it contains FileUpload1 upload control. The code may be inserted into parent form's Before Update or Before Insert events.
If Form1.FileUpload1.FileSize > 1024*1024 Then
  Form1.FileUpload1.TemporaryFolder = "c:\temp\"
Else
  Form1.FileUpload1.TemporaryFolder = "c:\windows\temp\"
End If

See also

FileFolder property


On-line, printable versions and updates