summaryrefslogtreecommitdiff
path: root/lib/facebook-graph-sdk/src/Facebook/FileUpload
diff options
context:
space:
mode:
Diffstat (limited to 'lib/facebook-graph-sdk/src/Facebook/FileUpload')
-rw-r--r--lib/facebook-graph-sdk/src/Facebook/FileUpload/FacebookResumableUploader.php10
-rw-r--r--lib/facebook-graph-sdk/src/Facebook/FileUpload/FacebookTransferChunk.php8
2 files changed, 18 insertions, 0 deletions
diff --git a/lib/facebook-graph-sdk/src/Facebook/FileUpload/FacebookResumableUploader.php b/lib/facebook-graph-sdk/src/Facebook/FileUpload/FacebookResumableUploader.php
index 92a22f1..46a2727 100644
--- a/lib/facebook-graph-sdk/src/Facebook/FileUpload/FacebookResumableUploader.php
+++ b/lib/facebook-graph-sdk/src/Facebook/FileUpload/FacebookResumableUploader.php
@@ -121,6 +121,16 @@ class FacebookResumableUploader
throw $e;
}
+ if (null !== $preException->getStartOffset() && null !== $preException->getEndOffset()) {
+ return new FacebookTransferChunk(
+ $chunk->getFile(),
+ $chunk->getUploadSessionId(),
+ $chunk->getVideoId(),
+ $preException->getStartOffset(),
+ $preException->getEndOffset()
+ );
+ }
+
// Return the same chunk entity so it can be retried.
return $chunk;
}
diff --git a/lib/facebook-graph-sdk/src/Facebook/FileUpload/FacebookTransferChunk.php b/lib/facebook-graph-sdk/src/Facebook/FileUpload/FacebookTransferChunk.php
index a909e87..99ea775 100644
--- a/lib/facebook-graph-sdk/src/Facebook/FileUpload/FacebookTransferChunk.php
+++ b/lib/facebook-graph-sdk/src/Facebook/FileUpload/FacebookTransferChunk.php
@@ -122,6 +122,14 @@ class FacebookTransferChunk
}
/**
+ * @return int
+ */
+ public function getEndOffset()
+ {
+ return $this->endOffset;
+ }
+
+ /**
* Get uploaded video Id
*
* @return int