CKFinder.Models.File
Hierarchy
Backbone.ModelCKFinder.Models.File
Represents the file model. A file model extends Backbone.Model.
To access its attributes, use the get( "attributeName" )
method.
Defined By
Properties
date : String
Date string represented as YYYYMMDDHHmmss, where:
Y - year
M - month
D - day
H - hour
m - minut...
Date string represented as YYYYMMDDHHmmss, where:
- Y - year
- M - month
- D - day
- H - hour
- m - minute
- s - second
Defaults to: ''
url : String
Optional value of the file direct URL. ...
Optional value of the file direct URL. If not present, use the CKFinder.Application.file:getUrl request to obtain the file URL.
Methods
Defined By
Instance methods getExtension( ) : StringReturns the file extension. ...Returns the file extension.
Returns
- String
File extension
getUrl( ) : String|BooleanReturns the file URL or false if the resource type requires the GetFileUrl command. ...Returns the file URL or false
if the resource type requires the GetFileUrl
command.
Returns
- String|Boolean
isImage( ) : BooleanReturns true if the file is an image supported by image editing tools. ...Returns true
if the file is an image supported by image editing tools.
Returns
- Boolean
getExtension( ) : String
Returns the file extension. ...
Returns the file extension.
Returns
- String
File extension
getUrl( ) : String|Boolean
Returns the file URL or false if the resource type requires the GetFileUrl command. ...
Returns the file URL or false
if the resource type requires the GetFileUrl
command.
Returns
- String|Boolean
isImage( ) : Boolean
Returns true if the file is an image supported by image editing tools. ...
Returns true
if the file is an image supported by image editing tools.
Returns
- Boolean
Defined By
Static methods Returns the file extension for a given file name. ...Returns the file extension for a given file name.
var File = CKFinder.require( 'CKFinder/Models/File' );
// Logs 'jpg'
console.log( File.extensionFromFileName( 'some_file.jpg' ) );
Parameters
- fileName : String
Returns
- String
File extension
Returns true if the extension is of an image supported by image editing tools. ...Returns true
if the extension is of an image supported by image editing tools.
var File = CKFinder.require( 'CKFinder/Models/File' );
// Logs true
console.log( File.isExtensionOfImage( 'jpg' ) );
Parameters
- extension : String
Returns
- Boolean
Returns the file extension for a given file name. ...
Returns the file extension for a given file name.
var File = CKFinder.require( 'CKFinder/Models/File' );
// Logs 'jpg'
console.log( File.extensionFromFileName( 'some_file.jpg' ) );
Parameters
- fileName : String
Returns
- String
File extension
Returns true if the extension is of an image supported by image editing tools. ...
Returns true
if the extension is of an image supported by image editing tools.
var File = CKFinder.require( 'CKFinder/Models/File' );
// Logs true
console.log( File.isExtensionOfImage( 'jpg' ) );
Parameters
- extension : String
Returns
- Boolean