Differences Between: [Versions 311 and 402] [Versions 311 and 403]
Copyright 2012 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
File Size: | 341 lines (9 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
Google_Http_MediaFileUpload:: (13 methods):
__construct()
setFileSize()
getProgress()
getHttpResultCode()
makePutRequest()
nextChunk()
resume()
process()
transformToUploadUrl()
getUploadType()
getResumeUri()
fetchResumeUri()
setChunkSize()
Class: Google_Http_MediaFileUpload - X-Ref
Manage large file uploads, which may be media but can be any type__construct(Google_Client $client,Google_Http_Request $request,$mimeType,$data,$resumable = false,$chunkSize = false,$boundary = false) X-Ref |
param: $mimeType string param: $data string The bytes you want to upload. param: $resumable bool param: bool $chunkSize File will be uploaded in chunks of this many bytes. |
setFileSize($size) X-Ref |
Set the size of the file that is being uploaded. param: $size - int file size in bytes |
getProgress() X-Ref |
Return the progress on the upload return: int progress in bytes uploaded. |
getHttpResultCode() X-Ref |
Return the HTTP result code from the last call made. return: int code |
makePutRequest(Google_Http_Request $httpRequest) X-Ref |
Sends a PUT-Request to google drive and parses the response, setting the appropiate variables from the response() param: Google_Http_Request $httpRequest the Reuqest which will be send return: false|mixed false when the upload is unfinished or the decoded http response |
nextChunk($chunk = false) X-Ref |
Send the next part of the file to upload. param: [$chunk] the next set of bytes to send. If false will used $data passed |
resume($resumeUri) X-Ref |
Resume a previously unfinished upload param: $resumeUri the resume-URI of the unfinished, resumable upload. |
process() X-Ref |
return: array|bool |
transformToUploadUrl() X-Ref |
No description |
getUploadType($meta) X-Ref |
Valid upload types: - resumable (UPLOAD_RESUMABLE_TYPE) - media (UPLOAD_MEDIA_TYPE) - multipart (UPLOAD_MULTIPART_TYPE) param: $meta return: string |
getResumeUri() X-Ref |
No description |
fetchResumeUri() X-Ref |
No description |
setChunkSize($chunkSize) X-Ref |
No description |