Skip to content

Commit

Permalink
1.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jayprajapati857 committed Jun 29, 2020
1 parent 5c059e9 commit 8cd0056
Show file tree
Hide file tree
Showing 15 changed files with 179 additions and 53 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.2.1] - 2020-06-29

### Added
- Cancel uploading request.
- XHR request instead of http client request because when unsubscribing the uploading event it was not cancelling the uploading request.

## [1.2.0] - 2020-06-23

### Fixed
Expand Down Expand Up @@ -62,6 +68,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Added File select directive
- Uploading files in a single request

[1.2.1]: https://github.com/jayprajapati857/ngx-uploader-directive/compare/1.2.0...1.2.1
[1.2.0]: https://github.com/jayprajapati857/ngx-uploader-directive/compare/1.1.7...1.2.0
[1.1.7]: https://github.com/jayprajapati857/ngx-uploader-directive/compare/1.1.5...1.1.7
[1.1.5]: https://github.com/jayprajapati857/ngx-uploader-directive/compare/1.1.4...1.1.5
Expand Down
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ Angular 9 File Uploader Directive which provides two directives, which are selec
Facilities provided by this directives:

- Upload all selected files in a single request.
- Only allow such type to upload settings (Ex. jpg, png, txt, pdf).
- Maximum file upload size settings.
- Single file in single request.
- Multiple files in single request.
- Multiple files in multiple request (as configured).
- Cancel ongoing requests.
- Only allow such type to upload settings (Ex. jpg, png, txt, pdf).
- Maximum file upload size settings.

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.3.10.

Expand Down Expand Up @@ -96,7 +98,6 @@ export interface ISelectedFile {
selectedEventType: 'DROP' | 'SELECT'; // Type of selection of file.
progress?: IUploadProgress; // File upload Progress.
nativeFile?: File; // Native File.
formData?: FormData; // Form data to upload with file.
response?: any; // Response for the selected file.
}

Expand Down Expand Up @@ -361,10 +362,6 @@ npm install
npm start
```

## Future plans

- Cancel uploading files request.

## Changelog

[Changelog](https://github.com/jayprajapati857/ngx-uploader-directive/blob/master/CHANGELOG.md)
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-uploader-directive",
"version": "1.2.0",
"version": "1.2.1",
"description": "Angular 9 File Uploader Directive which provides two directives, which are select and file drag and drop to upload files on server.",
"repository": {
"type": "git",
Expand Down Expand Up @@ -32,7 +32,7 @@
"scripts": {
"ng": "ng",
"start": "ng build ngx-uploader-directive-lib && npm install && ng serve --open",
"dev": "ng build ngx-uploader-directive-lib && ng serve",
"dev": "ng build ngx-uploader-directive-lib && ng serve --port 4300",
"build:lib": "ng build ngx-uploader-directive-lib",
"test": "ng test",
"lint": "ng lint",
Expand Down
7 changes: 7 additions & 0 deletions projects/ngx-uploader-directive/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.2.1] - 2020-06-29

### Added
- Cancel uploading request.
- XHR request instead of http client request because when unsubscribing the uploading event it was not cancelling the uploading request.

## [1.2.0] - 2020-06-23

### Fixed
Expand Down Expand Up @@ -62,6 +68,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Added File select directive
- Uploading files in a single request

[1.2.1]: https://github.com/jayprajapati857/ngx-uploader-directive/compare/1.2.0...1.2.1
[1.2.0]: https://github.com/jayprajapati857/ngx-uploader-directive/compare/1.1.7...1.2.0
[1.1.7]: https://github.com/jayprajapati857/ngx-uploader-directive/compare/1.1.5...1.1.7
[1.1.5]: https://github.com/jayprajapati857/ngx-uploader-directive/compare/1.1.4...1.1.5
Expand Down
11 changes: 4 additions & 7 deletions projects/ngx-uploader-directive/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ Angular 9 File Uploader Directive which provides two directives, which are selec
Facilities provided by this directives:

- Upload all selected files in a single request.
- Only allow such type to upload settings (Ex. jpg, png, txt, pdf).
- Maximum file upload size settings.
- Single file in single request.
- Multiple files in single request.
- Multiple files in multiple request (as configured).
- Cancel ongoing requests.
- Only allow such type to upload settings (Ex. jpg, png, txt, pdf).
- Maximum file upload size settings.

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.3.10.

Expand Down Expand Up @@ -96,7 +98,6 @@ export interface ISelectedFile {
selectedEventType: 'DROP' | 'SELECT'; // Type of selection of file.
progress?: IUploadProgress; // File upload Progress.
nativeFile?: File; // Native File.
formData?: FormData; // Form data to upload with file.
response?: any; // Response for the selected file.
}

Expand Down Expand Up @@ -361,10 +362,6 @@ npm install
npm start
```

## Future plans

- Cancel uploading files request.

## Changelog

[Changelog](https://github.com/jayprajapati857/ngx-uploader-directive/blob/master/CHANGELOG.md)
Expand Down
2 changes: 1 addition & 1 deletion projects/ngx-uploader-directive/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-uploader-directive",
"version": "1.2.0",
"version": "1.2.1",
"description": "Angular 9 File Uploader Directive which provides two directives, which are select and file drag and drop to upload files on server.",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion projects/ngx-uploader-directive/src/lib/configs/config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const environment = {
production: true
production: false
};
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { Directive, Input, EventEmitter, Output, ElementRef, HostListener } from
import { IUploadOptions, IUploadInput, IUploadOutput } from '../models/ngx-uploader-directive-models';
import { Subscription } from 'rxjs';
import { HttpClient } from '@angular/common/http';
import { NgxUploaderDirectiveService } from '../ngx-uploader-directive.service';
import { NgxUploaderDirectiveService } from '../services/ngx-uploader-directive.service';
import { environment } from '../configs/config';

@Directive({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { Directive, Input, EventEmitter, Output, ElementRef } from '@angular/cor
import { IUploadOptions, IUploadInput, IUploadOutput } from '../models/ngx-uploader-directive-models';
import { Subscription } from 'rxjs';
import { HttpClient } from '@angular/common/http';
import { NgxUploaderDirectiveService } from '../ngx-uploader-directive.service';
import { NgxUploaderDirectiveService } from '../services/ngx-uploader-directive.service';
import { environment } from '../configs/config';

@Directive({
Expand Down Expand Up @@ -74,10 +74,6 @@ export class NgxUploaderSelectDirective {
this.subscriptions.push(
this.uploadService.fileServiceEvents.subscribe((event: IUploadOutput) => {
if (event.fileSelectedEventType === 'SELECT' || event.fileSelectedEventType === 'ALL') {
if (this.options.logs && this.devEnv) {
console.info('Output select event', event);
}

if (event.type === 'error' || event.type === 'removedAll') {
this.element.files = null;
this.element.value = '';
Expand Down Expand Up @@ -111,9 +107,6 @@ export class NgxUploaderSelectDirective {

fileListener = () => {
// tslint:disable-next-line: no-console
if (this.options.logs && this.devEnv) {
console.info('File changes', this.element.files);
}
if (this.element.files) {
// call service method to handle selected files
this.uploadService.handleSelectedFiles(this.element.files, 'SELECT');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ export interface ISelectedFile {
selectedEventType: 'DROP' | 'SELECT'; // Type of selection of file.
progress?: IUploadProgress; // File upload Progress.
nativeFile?: File; // Native File.
formData?: FormData; // Form data to upload with file.
response?: any; // Response for the selected file.
}

Expand Down
Loading

0 comments on commit 8cd0056

Please sign in to comment.