Fix upload error handling
This commit is contained in:
parent
37ff5005b4
commit
672e185bf3
|
@ -76,10 +76,8 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="btn-group" role="group">
|
||||
<input type="button" class="btn" i18n-value="Retry failed upload of a video" value="Retry" (click)="retryUpload()" />
|
||||
<input type="button" class="btn" i18n-value="Cancel ongoing upload of a video" value="Cancel" (click)="cancelUpload()" />
|
||||
</div>
|
||||
<input type="button" class="peertube-button grey-button ms-1" i18n-value="Retry failed upload of a video" value="Retry" (click)="retryUpload()" />
|
||||
<input type="button" class="peertube-button grey-button ms-1" i18n-value="Cancel ongoing upload of a video" value="Cancel" (click)="cancelUpload()" />
|
||||
</div>
|
||||
|
||||
<div *ngIf="error && !enableRetryAfterError" class="alert alert-danger">
|
||||
|
|
|
@ -42,10 +42,4 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
input {
|
||||
@include peertube-button;
|
||||
@include grey-button;
|
||||
@include margin-left(10px);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -136,7 +136,7 @@ export class VideoUploadComponent extends VideoSend implements OnInit, OnDestroy
|
|||
onUploadVideoOngoing (state: UploadState) {
|
||||
switch (state.status) {
|
||||
case 'error': {
|
||||
if (!this.alreadyRefreshedToken && state.response.status === HttpStatusCode.UNAUTHORIZED_401) {
|
||||
if (!this.alreadyRefreshedToken && state.responseStatus === HttpStatusCode.UNAUTHORIZED_401) {
|
||||
this.alreadyRefreshedToken = true
|
||||
|
||||
return this.refereshTokenAndRetryUpload()
|
||||
|
|
Loading…
Reference in New Issue