File

projects/ng-file-drop/src/lib/models/file-rejection.model.ts

Description

This is a simple object model used to communicate that a specific file was rejected
and why it was rejected. This is provided to the consumer as an array of
FileRejection objects emitted from the filesRejected event.

Constructor

constructor(file: File, rejectionReason: RejectionReasons)

Simple constructor used internally for quick initialization of the model

Properties

file
file: File
rejectionReason
rejectionReason: RejectionReasons
import { RejectionReasons } from './rejection-reasons.model';

/**This is a simple object model used to communicate that a specific file was rejected
 * and why it was rejected.  This is provided to the consumer as an array of
 * FileRejection objects emitted from the filesRejected event.
*/
export class FileRejection {
    /**Simple constructor used internally for quick initialization of the model*/
    constructor(
        /**The file that was rejected*/
        public readonly file: File,
        /**The reason why the file was rejected*/
        public readonly rejectionReason: RejectionReasons
    ) {}
}

results matching ""

    No results matching ""