MetaPunkGames пре 1 месец
родитељ
комит
a9c29e634b

+ 8 - 1
projects/textbook/src/app/comp-upload/example-upload/example-upload.component.ts

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