Class FileViewModel
- Namespace
- Dynamicweb.Frontend
- Assembly
- Dynamicweb.dll
FileViewModel represents the rendering context used when a file is rendered.
- Inheritance
-
File
View Model
- Derived
- Inherited Members
Constructors
FileViewModel()
Initializes a new instance of the File
Properties
Extension
Gets the extension.
Property Value
- string
The extension e.g. '.jpg'
IsImage
Checks if the type is of Image
Property Value
- bool
Returns true if the this is an Image
File and false if it is not.View Model
Name
Gets the name.
Property Value
- string
The name of the file e.g. 'File1'
Path
Gets the relative path.
Property Value
- string
The path of the file e.g. '/Files/Images/myImages.jpg'.
PathUrlEncoded
Gets the path to the file in url encoded format for use in Urls.
Property Value
- string
The URL encoded path e.g. 'my%20folder/my%20image.jpg' instead of 'my folder/my image.jpg'.
Methods
ToString()
Returns the path.