Skip to content

Commit

Permalink
fix: uploaderClass typings
Browse files Browse the repository at this point in the history
  • Loading branch information
kukhariev committed May 21, 2019
1 parent 496acff commit f612677
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/uploadx/src/uploader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export abstract class Uploader {
/**
* Minimum chunk size
*/
static minChunkSize = 4096; // efault blocksize of most FSs
static minChunkSize = 4096; // default blocksize of most FSs
/**
* Initial chunk size
*/
Expand Down Expand Up @@ -146,6 +146,12 @@ export abstract class Uploader {
this.name = file.name;
this.size = file.size;
this.mimeType = file.type || 'application/octet-stream';
this.metadata = {
name: this.name,
mimeType: this.mimeType,
size: this.size,
lastModified: this.file.lastModified
};
this.stateChange = options.stateChange || noop;
this.chunkSize = options.chunkSize ? options.chunkSize : Uploader.startingChunkSize;
this.configure(options);
Expand Down
2 changes: 1 addition & 1 deletion src/uploadx/src/uploadx.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { UploaderX } from './uploaderx';

@Injectable({ providedIn: 'root' })
export class UploadxService {
private uploaderClass: { new (f: File, options: UploadxOptions): Uploader };
private uploaderClass: new (f: File, options: UploadxOptions) => Uploader;
private readonly eventsStream: Subject<UploadState> = new Subject();
get events() {
return this.eventsStream.asObservable();
Expand Down

0 comments on commit f612677

Please sign in to comment.