Click or drag to resize

FileManagerRootFolderLocation Property

Gets or sets the actual location of the root folder. This property is required and can not be omitted. The location can be a plain physical/virtual path string or a Location instance for one of the supported file systems like Amazon S3 and Azure Blob.

Namespace:  GleamTech.FileUltimate.AspNet.UI
Assembly:  GleamTech.FileUltimate (in GleamTech.FileUltimate.dll) Version: 7.9.0
Syntax
public Location Location { get; set; }

Property Value

Type: Location
Examples

Using physical/virtual path for root folder location:

//Setting physical location via string:
//(can also be virtual path string like "~/App_Data/SomeFolder")
rootFolder.Location = @"c:\SomeFolder";
//Same as above
rootFolder.Location = @"Type=Physical; Path=c:\SomeFolder";
//Setting physical location via a PhysicalLocation instance (same as above)
rootFolder.Location = new PhysicalLocation
{
    Path = @"c:\SomeFolder"
};

//---------------------------------------

//Using a UNC share for document location
//User Name can be speficied as Domain\User, User@Domain (UPN format), MachineName\User
//or User (local user). If a value contains semi-colon character, that value should be enclosed
//in single quotes (eg. Password='PASSWORD') or double quotes (eg. Password="PASSWORD").
rootFolder.Location = @"Path=\\server\share; User Name=USERNAME; Password=PASSWORD";
//Same as above
rootFolder.Location = new PhysicalLocation
{
    Path = @"\\server\share",
    UserName = "USERNAME",
    Password = "PASSWORD"
};

//If Windows Authentication is used in IIS for this site, location can be specified like this
//to connect as the already authenticated user: 
rootFolder.Location = @"Path=\\server\share; Authenticated User=Windows";
//Same as above
rootFolder.Location = new PhysicalLocation
{
    Path = @"\\server\share",
    AuthenticatedUser = AuthenticatedUser.Windows
};

Using Amazon S3 for root folder location:

//Setting Amazon S3 location via string:
rootFolder.Location =
    "Type=AmazonS3; Bucket Name=BUCKET; Region=eu-central-1; Access Key Id=XXX; Secret Access Key=XXX";
//Setting Amazon S3 location via an AmazonS3Location instance (same as above)
rootFolder.Location = new AmazonS3Location
{
    BucketName = "BUCKET",
    Region = "eu-central-1",
    AccessKeyId = "XXX",
    SecretAccessKey = "XXX",
    //You can also a specific path relative to the root
    //Path = "Some/Folder"
};

Using Azure for root folder location:

//Setting Azure Blob location via string:
rootFolder.Location = "Type=AzureBlob; Container=CONTAINER; Account Name=XXX; Account Key=XXX";
//Setting Azure Blob location via an AzureBlobLocation instance (same as above)
rootFolder.Location = new AzureBlobLocation
{
    Container = "CONTAINER",
    AccountName = "XXX",
    AccountKey = "XXX",
    //You can also a specific path relative to the root
    //Path = "Some/Folder"
};
See Also