Files
ng2-file-upload/components/file-upload
Vojtěch Kaláb d938aa1c39 # This is a combination of 3 commits.
# The first commit's message is:
feat(uploader): huge uploader update
- creted uploader options
- added `file type` support
- added headers to xhr
- rename FileUploaderSettings => FileUploaderOptionsInterface
- added public methods set Options
- created filter from set options
- added demo component

# The 2nd commit message will be skipped:

#	rename FileUploaderSettings => FileUploaderOptionsInterface

# The 3rd commit message will be skipped:

#	added public method setOptions
2016-05-11 19:40:26 +03:00
..

Usage

import {FileSelectDirective, FileDropDirective, FileUploader} from 'ng2-file-upload/ng2-file-upload';

Annotations

// class FileSelectDirective
@Directive({ selector: '[ng2FileSelect]' })
// class FileDropDirective
@Directive({ selector: '[ng2FileDrop]' })

FileSelect API

Properties

  • uploader - (FileUploader) - uploader object. See using in demo

Parameters that supported by this object:

  1. url - URL of File Uploader's route
  2. authToken - auth token that will be applied as 'Authorization' header during file send.

FileDrop API

Properties

  • uploader - (FileUploader) - uploader object. See using in demo

Events

  • fileOver - it fires during 'over' and 'out' events for Drop Area; returns boolean: true if file is over Drop Area, false in case of out. See using in ts demo and html demo