Skip to content

Commit

Permalink
overhaul
Browse files Browse the repository at this point in the history
  • Loading branch information
AckerApple committed Sep 6, 2017
1 parent e0712b8 commit 10fe312
Show file tree
Hide file tree
Showing 86 changed files with 950 additions and 13,473 deletions.
2 changes: 1 addition & 1 deletion .angular-cli.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"project": {
"name": "ng2-file-upload"
"name": "angular-file"
},
"apps": [
{
Expand Down
120 changes: 1 addition & 119 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ng2-file-upload - Change Log
# angular-file - Change Log
All notable changes to this project will be documented here.

## [1.3.0] - 2017-08-31
Expand All @@ -7,121 +7,3 @@ All notable changes to this project will be documented here.
## Added
- uploader.getFormData()

<a name="1.2.1"></a>
## [1.2.1](https://github.com/valor-software/ng2-file-upload/compare/v1.2.0...v1.2.1) (2017-04-10)


### Features

* **package:** relaxed peer dependencies to allow ng v4 ([#713](https://github.com/valor-software/ng2-file-upload/issues/713)) ([7704e0e](https://github.com/valor-software/ng2-file-upload/commit/7704e0e))



<a name="1.2.0"></a>
# [1.2.0](https://github.com/valor-software/ng2-file-upload/compare/v1.1.3-0...v1.2.0) (2017-01-17)


### Bug Fixes

* **headers:** Add FileItem headers to XHR ([#553](https://github.com/valor-software/ng2-file-upload/issues/553)) ([e4a7099](https://github.com/valor-software/ng2-file-upload/commit/e4a7099)), closes [#552](https://github.com/valor-software/ng2-file-upload/issues/552)


### Features

* **file-select:** Clear file select automatically ([#524](https://github.com/valor-software/ng2-file-upload/issues/524)) ([410efda](https://github.com/valor-software/ng2-file-upload/commit/410efda))
* **fileUpload:** added additionalParameter ([#565](https://github.com/valor-software/ng2-file-upload/issues/565)) ([397de09](https://github.com/valor-software/ng2-file-upload/commit/397de09))
* **package:** upgrade to ng v2.3+ ([#574](https://github.com/valor-software/ng2-file-upload/issues/574)) ([3cc6a99](https://github.com/valor-software/ng2-file-upload/commit/3cc6a99))



<a name="1.1.3-0"></a>
## [1.1.3-0](https://github.com/valor-software/ng2-file-upload/compare/v1.1.2...v1.1.3-0) (2016-10-19)


### Bug Fixes

* **typing:** added authTokenHeader property to options and file upload class ([b55c852](https://github.com/valor-software/ng2-file-upload/commit/b55c852))


### Features

* **build:** added support for AoT and ng-cli ([f0b2879](https://github.com/valor-software/ng2-file-upload/commit/f0b2879)), closes [#436](https://github.com/valor-software/ng2-file-upload/issues/436)
* **file-upload:** Add the possibility of set the token header ([#213](https://github.com/valor-software/ng2-file-upload/issues/213)) ([282295c](https://github.com/valor-software/ng2-file-upload/commit/282295c))



<a name="1.1.2"></a>
## [1.1.2](https://github.com/valor-software/ng2-file-upload/compare/v1.1.1...v1.1.2) (2016-10-17)


### Features

* **package:** allow of ng2 v2.0.* and v2.*.* ([87395e6](https://github.com/valor-software/ng2-file-upload/commit/87395e6))



<a name="1.1.1"></a>
## [1.1.1](https://github.com/valor-software/ng2-file-upload/compare/v1.0.3...v1.1.1) (2016-10-17)


### Bug Fixes

* **uploader:** Add the ability to upload files via PUT instead of POST ([#239](https://github.com/valor-software/ng2-file-upload/issues/239)) ([e068511](https://github.com/valor-software/ng2-file-upload/commit/e068511))
* **zone.js:** error in Safari, Added Typings ([#221](https://github.com/valor-software/ng2-file-upload/issues/221)) ([db77e89](https://github.com/valor-software/ng2-file-upload/commit/db77e89))


### Features

* **multipart:** Create disableMultipart option in FileUploader ([#224](https://github.com/valor-software/ng2-file-upload/issues/224)) ([22307d2](https://github.com/valor-software/ng2-file-upload/commit/22307d2))
* **package:** angular ~2.0.1 stable release ([#425](https://github.com/valor-software/ng2-file-upload/issues/425)) ([3fec385](https://github.com/valor-software/ng2-file-upload/commit/3fec385))
* **package:** updated to typescript 2 ([4fef496](https://github.com/valor-software/ng2-file-upload/commit/4fef496))



<a name="1.1.0"></a>
# [1.1.0](https://github.com/valor-software/ng2-file-upload/compare/v1.0.3...v1.1.0) (2016-09-21)


### Bug Fixes

* **uploader:** Add the ability to upload files via PUT instead of POST ([#239](https://github.com/valor-software/ng2-file-upload/issues/239)) ([e068511](https://github.com/valor-software/ng2-file-upload/commit/e068511))
* **zone.js:** error in Safari, Added Typings ([#221](https://github.com/valor-software/ng2-file-upload/issues/221)) ([db77e89](https://github.com/valor-software/ng2-file-upload/commit/db77e89))


### Features

* **multipart:** Create disableMultipart option in FileUploader ([#224](https://github.com/valor-software/ng2-file-upload/issues/224)) ([22307d2](https://github.com/valor-software/ng2-file-upload/commit/22307d2))
* **package:** updated to typescript 2 ([4fef496](https://github.com/valor-software/ng2-file-upload/commit/4fef496))



<a name="1.0.3"></a>
## [1.0.3](https://github.com/valor-software/ng2-file-upload/compare/v1.0.2...v1.0.3) (2016-05-12)



<a name="1.0.2"></a>
## 1.0.2 (2016-05-12)


### Bug Fixes

* **upload:** merge fix and get filters fix ([ef6091c](https://github.com/valor-software/ng2-file-upload/commit/ef6091c))


### Chores

* **build:** ng2 style guide applied ([aee69d8](https://github.com/valor-software/ng2-file-upload/commit/aee69d8))


### Features

* **package:** upgrade to angular 2.0.0-rc.1 ([#176](https://github.com/valor-software/ng2-file-upload/issues/176)) ([13c5c35](https://github.com/valor-software/ng2-file-upload/commit/13c5c35)), closes [#180](https://github.com/valor-software/ng2-file-upload/issues/180)


### BREAKING CHANGES

- directives and selectors renamed to ng2FileSelect and ng2FileDrop



36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
# ng2-file-upload [![npm version](https://badge.fury.io/js/ng2-file-upload.svg)](http://badge.fury.io/js/ng2-file-upload) [![npm downloads](https://img.shields.io/npm/dm/ng2-file-upload.svg)](https://npmjs.org/ng2-file-upload)[![slack](https://ngx-slack.herokuapp.com/badge.svg)](https://ngx-slack.herokuapp.com)
Easy to use Angular2 directives for files upload ([demo](http://valor-software.github.io/ng2-file-upload/))
# angular-file [![npm version](https://badge.fury.io/js/angular-file.svg)](http://badge.fury.io/js/angular-file) [![npm downloads](https://img.shields.io/npm/dm/angular-file.svg)](https://npmjs.org/angular-file)[![slack](https://ngx-slack.herokuapp.com/badge.svg)](https://ngx-slack.herokuapp.com)
Easy to use Angular2 directives for files upload ([demo](http://valor-software.github.io/angular-file/))

[![Angular 2 Style Guide](https://mgechev.github.io/angular2-style-guide/images/badge.svg)](https://github.com/mgechev/angular2-style-guide)
[![Build Status](https://travis-ci.org/valor-software/ng2-file-upload.svg?branch=development)](https://travis-ci.org/valor-software/ng2-file-upload)
[![Dependency Status](https://david-dm.org/valor-software/ng2-file-upload.svg)](https://david-dm.org/valor-software/ng2-file-upload)
[![Build Status](https://travis-ci.org/valor-software/angular-file.svg?branch=development)](https://travis-ci.org/valor-software/angular-file)
[![Dependency Status](https://david-dm.org/valor-software/angular-file.svg)](https://david-dm.org/valor-software/angular-file)

## Quick start

1. A recommended way to install ***ng2-file-upload*** is through [npm](https://www.npmjs.com/search?q=ng2-file-upload) package manager using the following command:
1. A recommended way to install ***angular-file*** is through [npm](https://www.npmjs.com/search?q=angular-file) package manager using the following command:

`npm i ng2-file-upload --save`
`npm i angular-file --save`

Alternatively, you can [download it in a ZIP file](https://github.com/valor-software/ng2-file-upload/archive/master.zip).
Alternatively, you can [download it in a ZIP file](https://github.com/valor-software/angular-file/archive/master.zip).

2. Currently `ng2-file-upload` contains two directives: `ng2-file-select` and `ng2-file-drop`. `ng2-file-select` is used for 'file-input' field of form and
2. Currently `angular-file` contains two directives: `ng2-file-select` and `ng2-file-drop`. `ng2-file-select` is used for 'file-input' field of form and
`ng2-file-drop` is used for area that will be used for dropping of file or files.

3. More information regarding using of ***ng2-file-upload*** is located in
[demo](http://valor-software.github.io/ng2-file-upload/) and [demo sources](https://github.com/valor-software/ng2-file-upload/tree/master/demo).
3. More information regarding using of ***angular-file*** is located in
[demo](http://valor-software.github.io/angular-file/) and [demo sources](https://github.com/valor-software/angular-file/tree/master/demo).

## API for `ng2FileSelect`
## API for `ngfSelect`

### Properties

- `uploader` - (`FileUploader`) - uploader object. See using in [demo](https://github.com/valor-software/ng2-file-upload/blob/master/demo/components/file-upload/simple-demo.ts)
- `uploader` - (`FileUploader`) - uploader object. See using in [demo](https://github.com/valor-software/angular-file/blob/master/demo/components/file-upload/simple-demo.ts)

## API for `ng2FileDrop`
## API for `ngfDrop`

### Properties

- `uploader` - (`FileUploader`) - uploader object. See using in [demo](https://github.com/valor-software/ng2-file-upload/blob/master/demo/components/file-upload/simple-demo.ts)
- `uploader` - (`FileUploader`) - uploader object. See using in [demo](https://github.com/valor-software/angular-file/blob/master/demo/components/file-upload/simple-demo.ts)

Parameters supported by this object:

Expand All @@ -41,18 +41,18 @@ Easy to use Angular2 directives for files upload ([demo](http://valor-software.g
### 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](https://github.com/valor-software/ng2-file-upload/blob/master/demo/components/file-upload/simple-demo.ts) and
[html demo](https://github.com/valor-software/ng2-file-upload/blob/master/demo/components/file-upload/simple-demo.html)
See using in [ts demo](https://github.com/valor-software/angular-file/blob/master/demo/components/file-upload/simple-demo.ts) and
[html demo](https://github.com/valor-software/angular-file/blob/master/demo/components/file-upload/simple-demo.html)

# Troubleshooting

Please follow this guidelines when reporting bugs and feature requests:

1. Use [GitHub Issues](https://github.com/valor-software/ng2-file-upload/issues) board to report bugs and feature requests (not our email address)
1. Use [GitHub Issues](https://github.com/valor-software/angular-file/issues) board to report bugs and feature requests (not our email address)
2. Please **always** write steps to reproduce the error. That way we can focus on fixing the bug, not scratching our heads trying to reproduce it.

Thanks for understanding!

### License

The MIT License (see the [LICENSE](https://github.com/valor-software/ng2-file-upload/blob/master/LICENSE) file for the full text)
The MIT License (see the [LICENSE](https://github.com/valor-software/angular-file/blob/master/LICENSE) file for the full text)
5 changes: 2 additions & 3 deletions demo/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import { FormsModule } from '@angular/forms';
import { BrowserModule } from '@angular/platform-browser';

import { TabsModule } from 'ngx-bootstrap/tabs';
//import { FileUploadModule } from 'ng2-file-upload';
import { FileUploadModule } from '../../../src';
import { ngfModule } from '../../../src';

import { AppComponent } from './app.component';
import { FileUploadSectionComponent } from './components/file-upload-section';
Expand All @@ -24,7 +23,7 @@ import { SimpleDemoComponent } from './components/file-upload/simple-demo.compon
imports: [
BrowserModule,
CommonModule,
FileUploadModule,
ngfModule,
TabsModule.forRoot(),
FormsModule
],
Expand Down
10 changes: 5 additions & 5 deletions demo/src/app/components/app.pug
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
main.bd-pageheader
.container
h1 ng2-file-upload
h1 angular-file
p The Angular2 File Upload directives
a.btn.btn-primary(href="https://github.com/valor-software/ng2-file-upload") View on GitHub
a.btn.btn-primary(href="https://github.com/valor-software/angular-file") View on GitHub
.row
.col-lg-1
iframe(src="https://ghbtns.com/github-btn.html?user=valor-software&repo=ng2-file-upload&type=star&count=true" frameborder="0" scrolling="0" width="170px" height="20px")
iframe(src="https://ghbtns.com/github-btn.html?user=valor-software&repo=angular-file&type=star&count=true" frameborder="0" scrolling="0" width="170px" height="20px")
.col-lg-1
iframe(src="https://ghbtns.com/github-btn.html?user=valor-software&repo=ng2-file-upload&type=fork&count=true" frameborder="0" scrolling="0" width="170px" height="20px")
iframe(src="https://ghbtns.com/github-btn.html?user=valor-software&repo=angular-file&type=fork&count=true" frameborder="0" scrolling="0" width="170px" height="20px")

.container
section(id="getting-started" "[innerHTML]"="gettingStarted|safeHtml")
Expand All @@ -17,7 +17,7 @@ main.bd-pageheader
footer.footer
.container
p.text-muted.text-center
a(href="https://github.com/valor-software/ng2-file-upload") ng2-file-upload
a(href="https://github.com/valor-software/angular-file") angular-file
|&nbsp;is maintained by&nbsp;
a(href="https://github.com/valor-software") valor-software
|.
10 changes: 5 additions & 5 deletions demo/src/app/components/app.template.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
export const string = ""+
"\n<main class=\"bd-pageheader\">"+
"\n <div class=\"container\">"+
"\n <h1>ng2-file-upload</h1>"+
"\n <p>The Angular2 File Upload directives</p><a class=\"btn btn-primary\" href=\"https://github.com/valor-software/ng2-file-upload\">View on GitHub</a>"+
"\n <h1>angular-file</h1>"+
"\n <p>The Angular2 File Upload directives</p><a class=\"btn btn-primary\" href=\"https://github.com/valor-software/angular-file\">View on GitHub</a>"+
"\n <div class=\"row\">"+
"\n <div class=\"col-lg-1\">"+
"\n <iframe src=\"https://ghbtns.com/github-btn.html?user=valor-software&amp;repo=ng2-file-upload&amp;type=star&amp;count=true\" frameborder=\"0\" scrolling=\"0\" width=\"170px\" height=\"20px\"></iframe>"+
"\n <iframe src=\"https://ghbtns.com/github-btn.html?user=valor-software&amp;repo=angular-file&amp;type=star&amp;count=true\" frameborder=\"0\" scrolling=\"0\" width=\"170px\" height=\"20px\"></iframe>"+
"\n </div>"+
"\n <div class=\"col-lg-1\">"+
"\n <iframe src=\"https://ghbtns.com/github-btn.html?user=valor-software&amp;repo=ng2-file-upload&amp;type=fork&amp;count=true\" frameborder=\"0\" scrolling=\"0\" width=\"170px\" height=\"20px\"></iframe>"+
"\n <iframe src=\"https://ghbtns.com/github-btn.html?user=valor-software&amp;repo=angular-file&amp;type=fork&amp;count=true\" frameborder=\"0\" scrolling=\"0\" width=\"170px\" height=\"20px\"></iframe>"+
"\n </div>"+
"\n </div>"+
"\n </div>"+
Expand All @@ -19,6 +19,6 @@ export const string = ""+
"\n</div>"+
"\n<footer class=\"footer\">"+
"\n <div class=\"container\">"+
"\n <p class=\"text-muted text-center\"><a href=\"https://github.com/valor-software/ng2-file-upload\">ng2-file-upload</a>&nbsp;is maintained by&nbsp;<a href=\"https://github.com/valor-software\">valor-software</a>.</p>"+
"\n <p class=\"text-muted text-center\"><a href=\"https://github.com/valor-software/angular-file\">angular-file</a>&nbsp;is maintained by&nbsp;<a href=\"https://github.com/valor-software\">valor-software</a>.</p>"+
"\n </div>"+
"\n</footer>"
14 changes: 7 additions & 7 deletions demo/src/app/components/doc.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
### Usage
```typescript
import { FileSelectDirective, FileDropDirective, FileUploader } from 'ng2-file-upload/ng2-file-upload';
import { ngfSelect, ngfDrop, FileUploader } from "angular-file";
```

### Annotations
```typescript
// class FileSelectDirective
@Directive({ selector: '[ng2FileSelect]' })
@Directive({ selector: '[ngfSelect]' })
```

```typescript
// class FileDropDirective
@Directive({ selector: '[ng2FileDrop]' })
@Directive({ selector: '[ngfDrop]' })
```

## FileSelect API

### Properties

- `uploader` - (`FileUploader`) - uploader object. See using in [demo](https://github.com/valor-software/ng2-file-upload/blob/master/demo/components/file-upload/simple-demo.ts)
- `uploader` - (`FileUploader`) - uploader object. See using in [demo](https://github.com/valor-software/angular-file/blob/master/demo/components/file-upload/simple-demo.ts)

Parameters supported by this object:

Expand All @@ -30,10 +30,10 @@ import { FileSelectDirective, FileDropDirective, FileUploader } from 'ng2-file-u

### Properties

- `uploader` - (`FileUploader`) - uploader object. See using in [demo](https://github.com/valor-software/ng2-file-upload/blob/master/demo/components/file-upload/simple-demo.ts)
- `uploader` - (`FileUploader`) - uploader object. See using in [demo](https://github.com/valor-software/angular-file/blob/master/demo/components/file-upload/simple-demo.ts)

### 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](https://github.com/valor-software/ng2-file-upload/blob/master/demo/components/file-upload/simple-demo.ts) and
[html demo](https://github.com/valor-software/ng2-file-upload/blob/master/demo/components/file-upload/simple-demo.html)
See using in [ts demo](https://github.com/valor-software/angular-file/blob/master/demo/components/file-upload/simple-demo.ts) and
[html demo](https://github.com/valor-software/angular-file/blob/master/demo/components/file-upload/simple-demo.html)
Loading

0 comments on commit 10fe312

Please sign in to comment.