AllowAccess (Dundas Upload Control 2.0)

Dundas

AllowAccess (UploadedFile Object)

Adds an allowance access control entity for a file which has been saved to disk.

Syntax

UploadedFileObject.AllowAccess(Account As String, Flags As Long)

The AllowAccess method syntax has the following parts:

Part

Description

Account

The name of a valid Windows account. You can optionally precede the account name with the domain name and a backslash.

Flags

A long which determines the type of access to be granted.

 

Remarks

Call this method to set the access rights for an uploaded file which has been saved to disk. This method is not applicable if the SaveToMemory method has been used instead of the Save method, since there will not be a copy of the uploaded file on disk.

To use named constants use a server-side include for the DSUpload.inc file which is distributed with the Upload Control installation.

The Account argument uses the following syntax: "[Domain\]Username".

The Flags argument can have any of the following values or any logical combination of the following values:

Description

Value

 

 

Generic Access Rights

 

GENERIC_ALL

&H10000000

GENERIC_EXECUTE

&H20000000

GENERIC_WRITE

&H40000000

GENERIC_READ

&H80000000

 

 

Standard Access Rights

 

DELETE

&H00010000

READ_CONTROL

&H00020000

WRITE_DAC

&H00040000

WRITE_OWNER

&H00008000

WRITE_SYNCHRONIZE

&H00010000

 

 

Specific Access Rights for files

 

FILE_GENERIC_READ

&H120089

FILE_GENERIC_WRITE

&H120116

FILE_GENERIC_EXECUTE

&H1200A0

 

 

FILE_READ_DATA

&H0001

FILE_WRITE_DATA

&H0002

FILE_APPEND_DATA

&H0004

FILE_READ_EA

&H0008

FILE_WRITE_EA

&H0010

FILE_EXECUTE

&H0020

FILE_READ_ATTRIBUTES

&H0080

FILE_WRITE_ATTRIBUTES

&H0100

FILE_ALL_ACCESS

&H001f03ff

  See Also: DenyAccess | RevokeAccess