aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/shared/components/genericForm/genericFormSharedComponent/uploadFiles/upload-files-link.model.ts
blob: beb54f43a8c6e505432500f538d3df1effcd7e62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import {FileItem} from "ng2-file-upload";

export class UploadFilesLinkModel {
  uploadText?: string;

  /*********************************************************************
   Implement success method - run after uploadMethod return true result
   **********************************************************************/
  onSuccess?: (...args) => void;

  /*********************************************************************
   Implement failed method - run after uploadMethod return false result
   **********************************************************************/
  onFailed?: (...args) => void;

  /*********************************************************************************
   Implement upload method and return the upload result status (false/true)
   *********************************************************************************/
  uploadMethod: (file: FileItem[], ...args) => Promise<boolean>;

  /********************************
   Should upload file be disabled
   ********************************/
  isDisabled?: (...args) => boolean;

  /********************************
   a tag data test id
   ********************************/
  dataTestId : string;
}