Upload Class |
Namespace: DataTables
public class Upload
The Upload type exposes the following members.
Name | Description | |
---|---|---|
Upload |
Upload constructor
| |
Upload(FuncHttpPostedFile, Object, Object) |
Upload constructor with a function action
| |
Upload(String) |
Upload constructor with a path action
|
Name | Description | |
---|---|---|
Action(FuncHttpPostedFile, Object, Object) |
Set the action to take when a file is uploaded. As a function the callback
is given the responsiblity of what to do with the uploaded file. That will
typically involve writing it to the file system so it can be used later.
| |
Action(String) |
Set the action to take when a file is uploaded. As a string the value
given is the full system path to where the uploaded file is written to.
The value given can include three "macros" which are replaced by the
script dependent on the uploaded file:
* '__EXTN__' - the file extension (with the dot)
* '__NAME__' - the uploaded file's name (including the extension)
* '__ID__' - Database primary key value if the 'Db()' method is used
| |
AllowedExtensions |
A list of valid file extensions that can be uploaded. This is for simple
validation that the file is of the expected type. The check is
case-insensitive. If no extensions are given, no validation is performed
on the file extension.
| |
Db |
Database configuration method. When used, this method will tell Editor
what information you want to be wirtten to a database on file upload, should
you wish to store relational information about your files on the database
(this is generally recommended).
| |
DbClean(FuncListDictionaryString, Object, Boolean) |
Set a callback function that is used to remove files which no longer have
a reference in a source table.
| |
DbClean(String, FuncListDictionaryString, Object, Boolean) |
Set a callback function that is used to remove files which no longer have
a reference in a source table.
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
Validator |
Add a validation method to check file uploads. Multiple validators can be
added by calling this method multiple times. They will be executed in
sequence when a file has been uploaded.
| |
Where |
Add one or more WHERE conditions to the data that is retrieved from the database
when querying it for the list of available files in a table.
|