I'm currently working on uploading various files using ng2-file-upload. I've been successful in uploading different file types like png and jpg, but I'm facing an issue with the .ply file extension. Can someone guide me on how to upload a file with that specific extension?
Here is the code snippet:
imga = "http://icons.iconarchive.com/icons/hopstarter/soft-scraps/256/Button-Upload-icon.png";
public uploader:FileUploader = new FileUploader({url: URL});
public hasBaseDropZoneOver:boolean = false;
public hasAnotherDropZoneOver:boolean = false;
public selectedFilesArray = [];
private selectedFile;
public selectFile(e: any): void {
var target = e.target || e.srcElement || e.currentTarget;
var value = target.innerHTML;
this.selectedFile = value;
this.selectAll = true;
this.selectedFilesArray = [];
this.selectedFilesArray.push(this.selectedFile);
}
public fileOverBase(e: any): void {
this.hasBaseDropZoneOver = e;
}
public selectAllFiles(e: any): void {
this.selectedFilesArray = [];
if (e.target.checked) {
this.selectAll = true;
for (var item in this.uploader.queue) {
this.selectedFilesArray.push(this.uploader.queue[item].file.name);
}
}
}
You can check out the StackBlitz demo here: https://stackblitz.com/edit/angular-r6cbrj