From 335fe15c47594d5e15badcb96ffae47035be85f9 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 9 Sep 2021 10:31:30 +0200 Subject: [PATCH] Disable chunk upload on ios See https://github.com/kukhariev/ngx-uploadx/issues/316#issuecomment-915858713 --- .../video-add-components/video-upload.component.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts b/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts index 56051cf4c..5fc8b21fb 100644 --- a/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts +++ b/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts @@ -10,6 +10,7 @@ import { LoadingBarService } from '@ngx-loading-bar/core' import { HttpStatusCode, VideoCreateResult, VideoPrivacy } from '@shared/models' import { UploaderXFormData } from './uploaderx-form-data' import { VideoSend } from './video-send' +import { isIOS } from 'src/assets/player/utils' @Component({ selector: 'my-video-upload', @@ -69,11 +70,17 @@ export class VideoUploadComponent extends VideoSend implements OnInit, OnDestroy ) { super() + // FIXME: https://github.com/Chocobozzz/PeerTube/issues/4382#issuecomment-915854167 + const chunkSize = isIOS() + ? 0 + : undefined // Auto chunk size + this.uploadxOptions = { endpoint: this.BASE_VIDEO_UPLOAD_URL, multiple: false, token: this.authService.getAccessToken(), uploaderClass: UploaderXFormData, + chunkSize, retryConfig: { maxAttempts: 6, shouldRetry: (code: number) => { -- 2.41.0