|
|
|
@ -165,23 +165,6 @@ export class AllFileComponent implements OnInit {
|
|
|
|
|
//input file 选择文件
|
|
|
|
|
selectFile (e) { |
|
|
|
|
this.file = e.target.files[0] || null //上传的文件
|
|
|
|
|
// console.log(this.selectedDataBank)
|
|
|
|
|
// console.log(this.file.name)
|
|
|
|
|
// this.http.get(`/api/Objects/drives`,{
|
|
|
|
|
// params:{
|
|
|
|
|
// prefix : this.selectedDataBank + "/" +this.file.name
|
|
|
|
|
// }
|
|
|
|
|
// }).subscribe((data:any)=>{
|
|
|
|
|
// if(data.contents.length != 0){
|
|
|
|
|
// var r = confirm(`已有同名文件,继续将替换该文件,是否替换?`);
|
|
|
|
|
// if (r == true) {
|
|
|
|
|
// this.startUploading()
|
|
|
|
|
// }
|
|
|
|
|
// }else{
|
|
|
|
|
// this.startUploading()
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
this.http.get(`/api/ObjectMetadata/drives/${this.selectedDataBank}/${this.file.name}`).subscribe( |
|
|
|
|
data=>{ |
|
|
|
|
var r = confirm(`已有同名文件,继续将替换该文件,是否替换?`); |
|
|
|
@ -330,9 +313,8 @@ export class AllFileComponent implements OnInit {
|
|
|
|
|
if (this.selection.selected.length === 1) { |
|
|
|
|
this.selectDownloadFile = this.selection.selected[0] |
|
|
|
|
this.http.get('/api/ObjectMetadata/drives/' + this.selectDownloadFile.key).subscribe(data=>{ |
|
|
|
|
console.log(123,data) |
|
|
|
|
this.download = data |
|
|
|
|
// this.downloadFile.download('o')
|
|
|
|
|
this.downloadFile.download(this.download) |
|
|
|
|
}) |
|
|
|
|
} else if (this.selection.selected.length>1) { |
|
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
|