File

src/lib/model/upload-file-item.model.ts

Index

Properties

Constructor

constructor(file: File)

Creates a new instance of UploadFileItem

Parameters :
Name Type Optional
file File no

Properties

Public _file
_file: File
Type : File

The File Item itself

Public id
id: string
Type : string

Uniqe File Item Id

Public name
name: string
Type : string

File Item name

Public size
size: number
Type : number

File Item Size

Public type
type: string
Type : string

File Item type

import {Utils} from '../util/utils';

export class UploadFileItem {
  /**
   * Uniqe File Item Id
   */
  public id: string;
  /**
   * File Item name
   */
  public name: string;
  /**
   * File Item Size
   */
  public size: number;
  /**
   * File Item type
   */
  public type: string;
  /**
   * The File Item itself
   */
  public _file: File;

  /**
   * Creates a new instance of UploadFileItem
   *
   * @param id Upload targets unique id
   * @param type Upload targets type
   */
  constructor(file: File) {
    this.id = Utils.uuid();
    this.name = file.name;
    this.size = file.size;
    this.type = file.type;
    this._file = file;
  }
}

results matching ""

    No results matching ""