mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2024-12-24 07:06:38 +00:00
Update add-iou-template.component.ts
This commit is contained in:
parent
3eda507229
commit
482834594f
@ -11,7 +11,7 @@ import { IouService } from '../../../../services/iou.service';
|
||||
import { ComputeService } from '../../../../services/compute.service';
|
||||
import { Compute } from '../../../../models/compute';
|
||||
import { FileUploader, FileItem, ParsedResponseHeaders } from 'ng2-file-upload';
|
||||
import { IouImage } from 'src/app/models/iou/iou-image';
|
||||
import { IouImage } from '../../models/iou/iou-image';
|
||||
|
||||
|
||||
@Component({
|
||||
@ -113,9 +113,8 @@ export class AddIouTemplateComponent implements OnInit {
|
||||
uploadImageFile(event): void {
|
||||
let name = event.target.files[0].name;
|
||||
this.imageForm.controls['imageName'].setValue(name);
|
||||
let fileName = event.target.files[0].name;
|
||||
|
||||
const url = this.iouService.getImagePath(this.server, fileName);
|
||||
const url = this.iouService.getImagePath(this.server, name);
|
||||
this.uploader.queue.forEach(elem => (elem.url = url));
|
||||
|
||||
const itemToUpload = this.uploader.queue[0];
|
||||
|
Loading…
Reference in New Issue
Block a user