Manage large file uploads, which may be media but can be any type of sizable data.
More...
|
const | UPLOAD_MEDIA_TYPE = 'media' |
|
const | UPLOAD_MULTIPART_TYPE = 'multipart' |
|
const | UPLOAD_RESUMABLE_TYPE = 'resumable' |
|
Manage large file uploads, which may be media but can be any type of sizable data.
◆ __construct()
Google_Http_MediaFileUpload::__construct |
( |
Google_Client | $client, |
|
|
Google_Http_Request | $request, |
|
|
| $mimeType, |
|
|
| $data, |
|
|
| $resumable = false, |
|
|
| $chunkSize = false, |
|
|
| $boundary = false ) |
- Parameters
-
| $mimeType | string |
| $data | string The bytes you want to upload. |
| $resumable | bool |
bool | $chunkSize | File will be uploaded in chunks of this many bytes. only used if resumable=True |
◆ getHttpResultCode()
Google_Http_MediaFileUpload::getHttpResultCode |
( |
| ) |
|
Return the HTTP result code from the last call made.
- Return values
-
◆ getProgress()
Google_Http_MediaFileUpload::getProgress |
( |
| ) |
|
Return the progress on the upload.
- Return values
-
int | progress in bytes uploaded. |
◆ getUploadType()
Google_Http_MediaFileUpload::getUploadType |
( |
| $meta | ) |
|
Valid upload types:
- resumable (UPLOAD_RESUMABLE_TYPE)
- media (UPLOAD_MEDIA_TYPE)
- multipart (UPLOAD_MULTIPART_TYPE)
- Parameters
-
- Return values
-
string | @visible for testing |
◆ nextChunk()
Google_Http_MediaFileUpload::nextChunk |
( |
| $chunk = false | ) |
|
Send the next part of the file to upload.
- Parameters
-
[$chunk] | the next set of bytes to send. If false will used $data passed at construct time. |
◆ resume()
Google_Http_MediaFileUpload::resume |
( |
| $resumeUri | ) |
|
Resume a previously unfinished upload.
- Parameters
-
$resumeUri | the resume-URI of the unfinished, resumable upload. |
◆ setFileSize()
Google_Http_MediaFileUpload::setFileSize |
( |
| $size | ) |
|
Set the size of the file that is being uploaded.
- Parameters
-
$size | - int file size in bytes |
The documentation for this class was generated from the following file:
- lib/google/src/Google/Http/MediaFileUpload.php