Table of Contents

Class File

Namespace
Oqtane.Models
Assembly
Oqtane.Shared.dll

Describes a File in Oqtane

public class File : ModelBase, IAuditable
Inheritance
File
Implements
Inherited Members
Extension Methods

Properties

Description

Description of a file

public string Description { get; set; }

Property Value

string

Extension

File name extension like 'jpg'

  • Always lower case
  • Without the dot (.)
public string Extension { get; set; }

Property Value

string

FileId

ID to identify the file

public int FileId { get; set; }

Property Value

int

Folder

Object reference to the Folder object. Use this if you need to determine what Site the file belongs to. TODO: not sure if this is always populated, must verify and document

public Folder Folder { get; set; }

Property Value

Folder

FolderId

Reference to the Folder. Use this if you need to determine what Site the file belongs to.

public int FolderId { get; set; }

Property Value

int

ImageHeight

The height of an image (if the file is an image) in pixels. This is calculated at time of Upload, so if the file is manually replaced, the value will be wrong.

public int ImageHeight { get; set; }

Property Value

int

ImageWidth

The width of an image (if the file is an image) in pixels. This is calculated at time of Upload, so if the file is manually replaced, the value will be wrong.

public int ImageWidth { get; set; }

Property Value

int

IsDeleted

Deprecated - not used

public bool? IsDeleted { get; set; }

Property Value

bool?

Name

Name of the file todo: with extension or not?

public string Name { get; set; }

Property Value

string

Size

File size

public int Size { get; set; }

Property Value

int

Url

url for accessing file

[NotMapped]
public string Url { get; set; }

Property Value

string