feat: add file upload component (#655)

The component allow upload the same file multiple times
This commit is contained in:
Róbert Kiss
2018-05-26 22:46:41 +02:00
committed by László Monda
parent 65ea786358
commit 8e20c85e07
8 changed files with 62 additions and 39 deletions

View File

@@ -30,15 +30,10 @@
(click)="onUpdateFirmware()">
Flash firmware {{ (getAgentVersionInfo$ | async).firmwareVersion }} (bundled with Agent)
</button>
<label class="btn btn-primary btn-file"
[class.disabled]="flashFirmwareButtonDisbabled$ | async">
Choose firmware file and flash it
<input id="firmware-file-select"
type="file"
accept=".tar.bz2"
[disabled]="flashFirmwareButtonDisbabled$ | async"
(change)="changeFile($event)">
</label>
<file-upload [disabled]="flashFirmwareButtonDisbabled$ | async"
(fileChanged)="changeFile($event)"
accept=".tar.bz2"
label="Choose firmware file and flash it"></file-upload>
</p>
</div>