CKFinder 3 Documentation

CKFinder.Models.File

Hierarchy

Backbone.Model
CKFinder.Models.File

Represents the file model. A file model extends Backbone.Model. To access its attributes, use the get( "attributeName" ) method.

Defined By

Properties

CKFinder.Models.File
: 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: ''

CKFinder.Models.File
: CKFinder.Models.Folder

Parent folder.

Parent folder.

CKFinder.Models.File
: String
A file name. ...

A file name.

Defaults to: ''

CKFinder.Models.File
: Number

File size in kilobytes.

File size in kilobytes.

CKFinder.Models.File
: 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

CKFinder.Models.File
( ) : String
Returns the file extension. ...

Returns the file extension.

Returns

  • String

    File extension

CKFinder.Models.File
( ) : 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
CKFinder.Models.File
( ) : 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
CKFinder.Models.File
( )
Forces to refresh views for this file. ...

Forces to refresh views for this file.

Defined By

Static methods

CKFinder.Models.File
( fileName ) : Stringstatic
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

CKFinder.Models.File
( extension ) : Booleanstatic
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
CKFinder.Models.File
( fileName ) : Booleanstatic
Returns true if the file name is valid. ...

Returns true if the file name is valid.

var File = CKFinder.require( 'CKFinder/Models/File' );
console.log( File.isValidName( 'foo.bar' ) );

Parameters

  • fileName : String

    file name

Returns

  • Boolean