Add missing files changed directive to upload
This commit is contained in:
parent
68f8eb5a8f
commit
b631b0f271
3 changed files with 45 additions and 2 deletions
|
@ -6,6 +6,27 @@ const templateUrl = require('./load-config.html');
|
|||
templateUrl,
|
||||
})
|
||||
export class LoadConfigComponent {
|
||||
constructor() {
|
||||
private resetUpload: number = 0;
|
||||
|
||||
private handleTarballSelected(files, callback) {
|
||||
console.log('hi world')
|
||||
/*
|
||||
$scope.certsUploading = true;
|
||||
$upload.upload({
|
||||
url: '/api/v1/superuser/customcerts/' + files[0].name,
|
||||
method: 'POST',
|
||||
data: {'_csrf_token': window.__token},
|
||||
file: files[0]
|
||||
}).success(function() {
|
||||
callback(true);
|
||||
$scope.resetUpload++;
|
||||
loadCertificates();
|
||||
}).error(function(r) {
|
||||
bootbox.alert('Could not upload certificate')
|
||||
callback(false);
|
||||
$scope.resetUpload++;
|
||||
loadCertificates();
|
||||
});
|
||||
*/
|
||||
}
|
||||
}
|
|
@ -10,7 +10,11 @@
|
|||
<!-- Body -->
|
||||
<div>
|
||||
Please upload a tarball
|
||||
<input type="file" accept=".tar"></div>
|
||||
<div class="file-upload-box"
|
||||
select-message="Select a previous configuration to modify. Must be in tar.gz format"
|
||||
files-selected="$ctrl.handleTarballSelected(files, callback)"
|
||||
reset="$ctrl.resetUpload"
|
||||
extensions="['application/gzip', '.gz']"></div>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
|
|
Reference in a new issue