Skip to content
This repository was archived by the owner on Jan 13, 2022. It is now read-only.

Commit dd8f1a7

Browse files
committed
Fix resumable upload error "There was a problem uploading your video. Please try again.
1 parent 2392804 commit dd8f1a7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/Facebook/FileUpload/FacebookResumableUploader.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,16 @@ public function transfer($endpoint, FacebookTransferChunk $chunk, $allowToThrow
121121
throw $e;
122122
}
123123

124+
if ($e->getSubErrorCode() === 1363037) {
125+
return new FacebookTransferChunk(
126+
$chunk->getFile(),
127+
$chunk->getUploadSessionId(),
128+
$chunk->getVideoId(),
129+
$e->getResponseData()['error']['error_data']['start_offset'],
130+
$e->getResponseData()['error']['error_data']['end_offset']
131+
);
132+
}
133+
124134
// Return the same chunk entity so it can be retried.
125135
return $chunk;
126136
}

0 commit comments

Comments
 (0)