|
@@ -1,5 +1,6 @@
|
|
import { Component, OnInit } from '@angular/core';
|
|
import { Component, OnInit } from '@angular/core';
|
|
import { CompUploadComponent } from '../comp-upload.component';
|
|
import { CompUploadComponent } from '../comp-upload.component';
|
|
|
|
+import { ProvierOssAli } from '../provider-oss-aliyun';
|
|
|
|
|
|
@Component({
|
|
@Component({
|
|
selector: 'app-example-upload',
|
|
selector: 'app-example-upload',
|
|
@@ -10,11 +11,17 @@ import { CompUploadComponent } from '../comp-upload.component';
|
|
})
|
|
})
|
|
export class ExampleUploadComponent implements OnInit {
|
|
export class ExampleUploadComponent implements OnInit {
|
|
|
|
|
|
- constructor() { }
|
|
|
|
|
|
+ ossProvider: { upload: any, get: any } | undefined;
|
|
|
|
+ constructor() {
|
|
|
|
+ this.ossProvider = new ProvierOssAli();
|
|
|
|
+ }
|
|
|
|
|
|
ngOnInit() {}
|
|
ngOnInit() {}
|
|
|
|
|
|
upload(ev:any){
|
|
upload(ev:any){
|
|
console.log(ev)
|
|
console.log(ev)
|
|
}
|
|
}
|
|
|
|
+ get(url:string){
|
|
|
|
+ this.ossProvider?.get(url);
|
|
|
|
+ }
|
|
}
|
|
}
|