file()
Get information about an uploaded file.
Please note - this property requires the Editor extension for DataTables.
The full Editor reference documentation is available to registered users of Editor - the information shown below is a summary only. If you already have an Editor license please sign-in, alternatively an Editor license can be purchased on this site, or sign up for the free trial.
Description
The Editor upload
and uploadMany
field types provide the ability for an end user to upload files to a server, potentially storing information about the file on a database (this is not mandatory for the upload field types to work, but it is required for this method to return information about the file).
Uploaded files are represented as a single value (typically a database id column), which doesn't always provide the information that is required for display to the end user (for example file name, size, type, etc). This method provides the ability to get the information that has been stored in a database about a file.
The information that is available about each file is directly determined by how the db()
method has been configured for the Upload
class on the server-side and will automatically populate the data source used for this method.
Please see the PHP and .NET for details of how to configure the db()
method. If db()
is not used to store file information on a database, this method will always give an error.