Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.files = this.files.filter(file => file.progress.status !== UploadStatus.Done);
}
handleUpload(ufile: UploadFile) {
if (ufile.progress.status === UploadStatus.Done ) {
let resp = JSON.parse(ufile.response);
this.jobId = resp.job_id;
this.observer.complete();
}
}
this.files = this.files.filter(file => file.progress.status !== UploadStatus.Done);
}
handleUpload(ufile: UploadFile) {
if (ufile.progress.status === UploadStatus.Done) {
let resp = JSON.parse(ufile.response);
this.jobId = resp.job_id;
this.observer.complete();
}
}
constructor(
@Inject(NgZone) private zone: NgZone,
private router: Router,
private route:ActivatedRoute,
private bookService: BookService,
private authorService: AuthorService,
private categoryService: CategoryService,
private publisherService: PublisherService
) {
const {url} = this.router
this.setTitle(url)
this.getDefaults()
this.options = new NgUploaderOptions({
url: 'http://api.ngx-uploader.com/upload',
autoUpload: false,
previewUrl: true
})
}