Article: AN0001679Updated:
This object contains information about files attached to the class record. In order to get the file content use the script method OG.DataRowFile.GetFileContent or display the page GetFileContent.aspx, that returns file content. You can get the proper url to the page by calling the method GetUrl().
Object properties
Name |
Description |
int Id |
File Id. |
int? DataRowId |
Id of the data record to which the file is attached. |
int ColumnClassDefId |
Id of the column to which the file is attached. |
string Name |
File name. |
string FileMimeType |
Mime type of the file. |
int FileLength |
Length of the file in bytes. |
bool IsFile |
Indication, wheather the file content is in the database (it depends on the column setting of the file deletion type). |
string GetUrl() |
Function returns url to the page GetFileContent.aspx for getting the file content. |
string GetFileId() |
Function returns full file Id. It consists from the column Id and and file Id. |
string GetUrl(Guid g) |
Function returns url to the page GetFileContent.aspx for getting file content. The input guid is identifier for time link. |
There are three Id important for each file - class Id, record Id, column Id. Files are stored in the database in another table than actual class data. Therefore, you need these values for accessing the file.
If you set File deletion type to Delete only file content in the column definition, than a record about a "former" file is kept in the database and property IsFile = false. Otherwise, IsFile = true.