1<?xml version="1.0" encoding="ascii"?> 2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 3 "DTD/xhtml1-transitional.dtd"> 4<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 5<head> 6 <title>googleapiclient.http.MediaIoBaseUpload</title> 7 <link rel="stylesheet" href="epydoc.css" type="text/css" /> 8 <script type="text/javascript" src="epydoc.js"></script> 9</head> 10 11<body bgcolor="white" text="black" link="blue" vlink="#204080" 12 alink="#204080"> 13<!-- ==================== NAVIGATION BAR ==================== --> 14<table class="navbar" border="0" width="100%" cellpadding="0" 15 bgcolor="#a0c0ff" cellspacing="0"> 16 <tr valign="middle"> 17 <!-- Home link --> 18 <th> <a 19 href="googleapiclient-module.html">Home</a> </th> 20 21 <!-- Tree link --> 22 <th> <a 23 href="module-tree.html">Trees</a> </th> 24 25 <!-- Index link --> 26 <th> <a 27 href="identifier-index.html">Indices</a> </th> 28 29 <!-- Help link --> 30 <th> <a 31 href="help.html">Help</a> </th> 32 33 <th class="navbar" width="100%"></th> 34 </tr> 35</table> 36<table width="100%" cellpadding="0" cellspacing="0"> 37 <tr valign="top"> 38 <td width="100%"> 39 <span class="breadcrumbs"> 40 <a href="googleapiclient-module.html">Package googleapiclient</a> :: 41 <a href="googleapiclient.http-module.html">Module http</a> :: 42 Class MediaIoBaseUpload 43 </span> 44 </td> 45 <td> 46 <table cellpadding="0" cellspacing="0"> 47 <!-- hide/show private --> 48 <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink" 49 onclick="toggle_private();">hide private</a>]</span></td></tr> 50 <tr><td align="right"><span class="options" 51 >[<a href="frames.html" target="_top">frames</a 52 >] | <a href="googleapiclient.http.MediaIoBaseUpload-class.html" 53 target="_top">no frames</a>]</span></td></tr> 54 </table> 55 </td> 56 </tr> 57</table> 58<!-- ==================== CLASS DESCRIPTION ==================== --> 59<h1 class="epydoc">Class MediaIoBaseUpload</h1><p class="nomargin-top"><span class="codelink"><a href="googleapiclient.http-pysrc.html#MediaIoBaseUpload">source code</a></span></p> 60<center> 61 62</center> 63<hr /> 64<pre class="literalblock"> 65A MediaUpload for a io.Base objects. 66 67Note that the Python file object is compatible with io.Base and can be used 68with this class also. 69 70 fh = BytesIO('...Some data to upload...') 71 media = MediaIoBaseUpload(fh, mimetype='image/png', 72 chunksize=1024*1024, resumable=True) 73 farm.animals().insert( 74 id='cow', 75 name='cow.png', 76 media_body=media).execute() 77 78Depending on the platform you are working on, you may pass -1 as the 79chunksize, which indicates that the entire file should be uploaded in a single 80request. If the underlying platform supports streams, such as Python 2.6 or 81later, then this can be very efficient as it avoids multiple connections, and 82also avoids loading the entire file into memory before sending it. Note that 83Google App Engine has a 5MB limit on request size, so you should never set 84your chunksize larger than 5MB, or to -1. 85 86</pre> 87 88<!-- ==================== INSTANCE METHODS ==================== --> 89<a name="section-InstanceMethods"></a> 90<table class="summary" border="1" cellpadding="3" 91 cellspacing="0" width="100%" bgcolor="white"> 92<tr bgcolor="#70b0f0" class="table-header"> 93 <td colspan="2" class="table-header"> 94 <table border="0" cellpadding="0" cellspacing="0" width="100%"> 95 <tr valign="top"> 96 <td align="left"><span class="table-header">Instance Methods</span></td> 97 <td align="right" valign="top" 98 ><span class="options">[<a href="#section-InstanceMethods" 99 class="privatelink" onclick="toggle_private();" 100 >hide private</a>]</span></td> 101 </tr> 102 </table> 103 </td> 104</tr> 105<tr> 106 <td width="15%" align="right" valign="top" class="summary"> 107 <span class="summary-type"> </span> 108 </td><td class="summary"> 109 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 110 <tr> 111 <td><span class="summary-sig"><a href="googleapiclient.http.MediaIoBaseUpload-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>, 112 <span class="summary-sig-arg">fd</span>, 113 <span class="summary-sig-arg">mimetype</span>, 114 <span class="summary-sig-arg">chunksize</span>=<span class="summary-sig-default">DEFAULT_CHUNK_SIZE</span>, 115 <span class="summary-sig-arg">resumable</span>=<span class="summary-sig-default">False</span>)</span><br /> 116 Constructor.</td> 117 <td align="right" valign="top"> 118 <span class="codelink"><a href="googleapiclient.http-pysrc.html#MediaIoBaseUpload.__init__">source code</a></span> 119 120 </td> 121 </tr> 122 </table> 123 124 </td> 125 </tr> 126<tr> 127 <td width="15%" align="right" valign="top" class="summary"> 128 <span class="summary-type"> </span> 129 </td><td class="summary"> 130 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 131 <tr> 132 <td><span class="summary-sig"><a href="googleapiclient.http.MediaIoBaseUpload-class.html#chunksize" class="summary-sig-name">chunksize</a>(<span class="summary-sig-arg">self</span>)</span><br /> 133 Chunk size for resumable uploads.</td> 134 <td align="right" valign="top"> 135 <span class="codelink"><a href="googleapiclient.http-pysrc.html#MediaIoBaseUpload.chunksize">source code</a></span> 136 137 </td> 138 </tr> 139 </table> 140 141 </td> 142 </tr> 143<tr> 144 <td width="15%" align="right" valign="top" class="summary"> 145 <span class="summary-type"> </span> 146 </td><td class="summary"> 147 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 148 <tr> 149 <td><span class="summary-sig"><a href="googleapiclient.http.MediaIoBaseUpload-class.html#mimetype" class="summary-sig-name">mimetype</a>(<span class="summary-sig-arg">self</span>)</span><br /> 150 Mime type of the body.</td> 151 <td align="right" valign="top"> 152 <span class="codelink"><a href="googleapiclient.http-pysrc.html#MediaIoBaseUpload.mimetype">source code</a></span> 153 154 </td> 155 </tr> 156 </table> 157 158 </td> 159 </tr> 160<tr> 161 <td width="15%" align="right" valign="top" class="summary"> 162 <span class="summary-type"> </span> 163 </td><td class="summary"> 164 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 165 <tr> 166 <td><span class="summary-sig"><a href="googleapiclient.http.MediaIoBaseUpload-class.html#size" class="summary-sig-name">size</a>(<span class="summary-sig-arg">self</span>)</span><br /> 167 Size of upload.</td> 168 <td align="right" valign="top"> 169 <span class="codelink"><a href="googleapiclient.http-pysrc.html#MediaIoBaseUpload.size">source code</a></span> 170 171 </td> 172 </tr> 173 </table> 174 175 </td> 176 </tr> 177<tr> 178 <td width="15%" align="right" valign="top" class="summary"> 179 <span class="summary-type"> </span> 180 </td><td class="summary"> 181 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 182 <tr> 183 <td><span class="summary-sig"><a href="googleapiclient.http.MediaIoBaseUpload-class.html#resumable" class="summary-sig-name">resumable</a>(<span class="summary-sig-arg">self</span>)</span><br /> 184 Whether this upload is resumable.</td> 185 <td align="right" valign="top"> 186 <span class="codelink"><a href="googleapiclient.http-pysrc.html#MediaIoBaseUpload.resumable">source code</a></span> 187 188 </td> 189 </tr> 190 </table> 191 192 </td> 193 </tr> 194<tr> 195 <td width="15%" align="right" valign="top" class="summary"> 196 <span class="summary-type"> </span> 197 </td><td class="summary"> 198 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 199 <tr> 200 <td><span class="summary-sig"><a href="googleapiclient.http.MediaIoBaseUpload-class.html#getbytes" class="summary-sig-name">getbytes</a>(<span class="summary-sig-arg">self</span>, 201 <span class="summary-sig-arg">begin</span>, 202 <span class="summary-sig-arg">length</span>)</span><br /> 203 Get bytes from the media.</td> 204 <td align="right" valign="top"> 205 <span class="codelink"><a href="googleapiclient.http-pysrc.html#MediaIoBaseUpload.getbytes">source code</a></span> 206 207 </td> 208 </tr> 209 </table> 210 211 </td> 212 </tr> 213<tr> 214 <td width="15%" align="right" valign="top" class="summary"> 215 <span class="summary-type"> </span> 216 </td><td class="summary"> 217 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 218 <tr> 219 <td><span class="summary-sig"><a href="googleapiclient.http.MediaIoBaseUpload-class.html#has_stream" class="summary-sig-name">has_stream</a>(<span class="summary-sig-arg">self</span>)</span><br /> 220 Does the underlying upload support a streaming interface.</td> 221 <td align="right" valign="top"> 222 <span class="codelink"><a href="googleapiclient.http-pysrc.html#MediaIoBaseUpload.has_stream">source code</a></span> 223 224 </td> 225 </tr> 226 </table> 227 228 </td> 229 </tr> 230<tr> 231 <td width="15%" align="right" valign="top" class="summary"> 232 <span class="summary-type"> </span> 233 </td><td class="summary"> 234 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 235 <tr> 236 <td><span class="summary-sig"><a href="googleapiclient.http.MediaIoBaseUpload-class.html#stream" class="summary-sig-name">stream</a>(<span class="summary-sig-arg">self</span>)</span><br /> 237 A stream interface to the data being uploaded.</td> 238 <td align="right" valign="top"> 239 <span class="codelink"><a href="googleapiclient.http-pysrc.html#MediaIoBaseUpload.stream">source code</a></span> 240 241 </td> 242 </tr> 243 </table> 244 245 </td> 246 </tr> 247<tr> 248 <td width="15%" align="right" valign="top" class="summary"> 249 <span class="summary-type"> </span> 250 </td><td class="summary"> 251 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 252 <tr> 253 <td><span class="summary-sig"><a href="googleapiclient.http.MediaIoBaseUpload-class.html#to_json" class="summary-sig-name">to_json</a>(<span class="summary-sig-arg">self</span>)</span><br /> 254 This upload type is not serializable.</td> 255 <td align="right" valign="top"> 256 <span class="codelink"><a href="googleapiclient.http-pysrc.html#MediaIoBaseUpload.to_json">source code</a></span> 257 258 </td> 259 </tr> 260 </table> 261 262 </td> 263 </tr> 264 <tr> 265 <td colspan="2" class="summary"> 266 <div class="private"> <p class="indent-wrapped-lines"><b>Inherited from <code><a href="googleapiclient.http.MediaUpload-class.html">MediaUpload</a></code></b> (private): 267 <code><a href="googleapiclient.http.MediaUpload-class.html#_to_json" onclick="show_private();">_to_json</a></code> 268 </p></div> 269 <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>: 270 <code>__delattr__</code>, 271 <code>__format__</code>, 272 <code>__getattribute__</code>, 273 <code>__hash__</code>, 274 <code>__new__</code>, 275 <code>__reduce__</code>, 276 <code>__reduce_ex__</code>, 277 <code>__repr__</code>, 278 <code>__setattr__</code>, 279 <code>__sizeof__</code>, 280 <code>__str__</code>, 281 <code>__subclasshook__</code> 282 </p> 283 </td> 284 </tr> 285</table> 286<!-- ==================== CLASS METHODS ==================== --> 287<a name="section-ClassMethods"></a> 288<table class="summary" border="1" cellpadding="3" 289 cellspacing="0" width="100%" bgcolor="white"> 290<tr bgcolor="#70b0f0" class="table-header"> 291 <td colspan="2" class="table-header"> 292 <table border="0" cellpadding="0" cellspacing="0" width="100%"> 293 <tr valign="top"> 294 <td align="left"><span class="table-header">Class Methods</span></td> 295 <td align="right" valign="top" 296 ><span class="options">[<a href="#section-ClassMethods" 297 class="privatelink" onclick="toggle_private();" 298 >hide private</a>]</span></td> 299 </tr> 300 </table> 301 </td> 302</tr> 303 <tr> 304 <td colspan="2" class="summary"> 305 <p class="indent-wrapped-lines"><b>Inherited from <code><a href="googleapiclient.http.MediaUpload-class.html">MediaUpload</a></code></b>: 306 <code><a href="googleapiclient.http.MediaUpload-class.html#new_from_json">new_from_json</a></code> 307 </p> 308 </td> 309 </tr> 310</table> 311<!-- ==================== PROPERTIES ==================== --> 312<a name="section-Properties"></a> 313<table class="summary" border="1" cellpadding="3" 314 cellspacing="0" width="100%" bgcolor="white"> 315<tr bgcolor="#70b0f0" class="table-header"> 316 <td colspan="2" class="table-header"> 317 <table border="0" cellpadding="0" cellspacing="0" width="100%"> 318 <tr valign="top"> 319 <td align="left"><span class="table-header">Properties</span></td> 320 <td align="right" valign="top" 321 ><span class="options">[<a href="#section-Properties" 322 class="privatelink" onclick="toggle_private();" 323 >hide private</a>]</span></td> 324 </tr> 325 </table> 326 </td> 327</tr> 328 <tr> 329 <td colspan="2" class="summary"> 330 <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>: 331 <code>__class__</code> 332 </p> 333 </td> 334 </tr> 335</table> 336<!-- ==================== METHOD DETAILS ==================== --> 337<a name="section-MethodDetails"></a> 338<table class="details" border="1" cellpadding="3" 339 cellspacing="0" width="100%" bgcolor="white"> 340<tr bgcolor="#70b0f0" class="table-header"> 341 <td colspan="2" class="table-header"> 342 <table border="0" cellpadding="0" cellspacing="0" width="100%"> 343 <tr valign="top"> 344 <td align="left"><span class="table-header">Method Details</span></td> 345 <td align="right" valign="top" 346 ><span class="options">[<a href="#section-MethodDetails" 347 class="privatelink" onclick="toggle_private();" 348 >hide private</a>]</span></td> 349 </tr> 350 </table> 351 </td> 352</tr> 353</table> 354<a name="__init__"></a> 355<div> 356<table class="details" border="1" cellpadding="3" 357 cellspacing="0" width="100%" bgcolor="white"> 358<tr><td> 359 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 360 <tr valign="top"><td> 361 <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>, 362 <span class="sig-arg">fd</span>, 363 <span class="sig-arg">mimetype</span>, 364 <span class="sig-arg">chunksize</span>=<span class="sig-default">DEFAULT_CHUNK_SIZE</span>, 365 <span class="sig-arg">resumable</span>=<span class="sig-default">False</span>)</span> 366 <br /><em class="fname">(Constructor)</em> 367 </h3> 368 </td><td align="right" valign="top" 369 ><span class="codelink"><a href="googleapiclient.http-pysrc.html#MediaIoBaseUpload.__init__">source code</a></span> 370 </td> 371 </tr></table> 372 373 <pre class="literalblock"> 374Constructor. 375 376Args: 377 fd: io.Base or file object, The source of the bytes to upload. MUST be 378 opened in blocking mode, do not use streams opened in non-blocking mode. 379 The given stream must be seekable, that is, it must be able to call 380 seek() on fd. 381 mimetype: string, Mime-type of the file. 382 chunksize: int, File will be uploaded in chunks of this many bytes. Only 383 used if resumable=True. Pass in a value of -1 if the file is to be 384 uploaded as a single chunk. Note that Google App Engine has a 5MB limit 385 on request size, so you should never set your chunksize larger than 5MB, 386 or to -1. 387 resumable: bool, True if this is a resumable upload. False means upload 388 in a single request. 389 390</pre> 391 <dl class="fields"> 392 <dt>Decorators:</dt> 393 <dd><ul class="nomargin-top"> 394 <li><code>@util.positional(3)</code></li> 395 </ul></dd> 396 <dt>Overrides: 397 object.__init__ 398 </dt> 399 </dl> 400</td></tr></table> 401</div> 402<a name="chunksize"></a> 403<div> 404<table class="details" border="1" cellpadding="3" 405 cellspacing="0" width="100%" bgcolor="white"> 406<tr><td> 407 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 408 <tr valign="top"><td> 409 <h3 class="epydoc"><span class="sig"><span class="sig-name">chunksize</span>(<span class="sig-arg">self</span>)</span> 410 </h3> 411 </td><td align="right" valign="top" 412 ><span class="codelink"><a href="googleapiclient.http-pysrc.html#MediaIoBaseUpload.chunksize">source code</a></span> 413 </td> 414 </tr></table> 415 416 <pre class="literalblock"> 417Chunk size for resumable uploads. 418 419Returns: 420 Chunk size in bytes. 421 422</pre> 423 <dl class="fields"> 424 <dt>Overrides: 425 <a href="googleapiclient.http.MediaUpload-class.html#chunksize">MediaUpload.chunksize</a> 426 </dt> 427 </dl> 428</td></tr></table> 429</div> 430<a name="mimetype"></a> 431<div> 432<table class="details" border="1" cellpadding="3" 433 cellspacing="0" width="100%" bgcolor="white"> 434<tr><td> 435 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 436 <tr valign="top"><td> 437 <h3 class="epydoc"><span class="sig"><span class="sig-name">mimetype</span>(<span class="sig-arg">self</span>)</span> 438 </h3> 439 </td><td align="right" valign="top" 440 ><span class="codelink"><a href="googleapiclient.http-pysrc.html#MediaIoBaseUpload.mimetype">source code</a></span> 441 </td> 442 </tr></table> 443 444 <pre class="literalblock"> 445Mime type of the body. 446 447Returns: 448 Mime type. 449 450</pre> 451 <dl class="fields"> 452 <dt>Overrides: 453 <a href="googleapiclient.http.MediaUpload-class.html#mimetype">MediaUpload.mimetype</a> 454 </dt> 455 </dl> 456</td></tr></table> 457</div> 458<a name="size"></a> 459<div> 460<table class="details" border="1" cellpadding="3" 461 cellspacing="0" width="100%" bgcolor="white"> 462<tr><td> 463 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 464 <tr valign="top"><td> 465 <h3 class="epydoc"><span class="sig"><span class="sig-name">size</span>(<span class="sig-arg">self</span>)</span> 466 </h3> 467 </td><td align="right" valign="top" 468 ><span class="codelink"><a href="googleapiclient.http-pysrc.html#MediaIoBaseUpload.size">source code</a></span> 469 </td> 470 </tr></table> 471 472 <pre class="literalblock"> 473Size of upload. 474 475Returns: 476 Size of the body, or None of the size is unknown. 477 478</pre> 479 <dl class="fields"> 480 <dt>Overrides: 481 <a href="googleapiclient.http.MediaUpload-class.html#size">MediaUpload.size</a> 482 </dt> 483 </dl> 484</td></tr></table> 485</div> 486<a name="resumable"></a> 487<div> 488<table class="details" border="1" cellpadding="3" 489 cellspacing="0" width="100%" bgcolor="white"> 490<tr><td> 491 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 492 <tr valign="top"><td> 493 <h3 class="epydoc"><span class="sig"><span class="sig-name">resumable</span>(<span class="sig-arg">self</span>)</span> 494 </h3> 495 </td><td align="right" valign="top" 496 ><span class="codelink"><a href="googleapiclient.http-pysrc.html#MediaIoBaseUpload.resumable">source code</a></span> 497 </td> 498 </tr></table> 499 500 <pre class="literalblock"> 501Whether this upload is resumable. 502 503Returns: 504 True if resumable upload or False. 505 506</pre> 507 <dl class="fields"> 508 <dt>Overrides: 509 <a href="googleapiclient.http.MediaUpload-class.html#resumable">MediaUpload.resumable</a> 510 </dt> 511 </dl> 512</td></tr></table> 513</div> 514<a name="getbytes"></a> 515<div> 516<table class="details" border="1" cellpadding="3" 517 cellspacing="0" width="100%" bgcolor="white"> 518<tr><td> 519 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 520 <tr valign="top"><td> 521 <h3 class="epydoc"><span class="sig"><span class="sig-name">getbytes</span>(<span class="sig-arg">self</span>, 522 <span class="sig-arg">begin</span>, 523 <span class="sig-arg">length</span>)</span> 524 </h3> 525 </td><td align="right" valign="top" 526 ><span class="codelink"><a href="googleapiclient.http-pysrc.html#MediaIoBaseUpload.getbytes">source code</a></span> 527 </td> 528 </tr></table> 529 530 <pre class="literalblock"> 531Get bytes from the media. 532 533Args: 534 begin: int, offset from beginning of file. 535 length: int, number of bytes to read, starting at begin. 536 537Returns: 538 A string of bytes read. May be shorted than length if EOF was reached 539 first. 540 541</pre> 542 <dl class="fields"> 543 <dt>Overrides: 544 <a href="googleapiclient.http.MediaUpload-class.html#getbytes">MediaUpload.getbytes</a> 545 </dt> 546 </dl> 547</td></tr></table> 548</div> 549<a name="has_stream"></a> 550<div> 551<table class="details" border="1" cellpadding="3" 552 cellspacing="0" width="100%" bgcolor="white"> 553<tr><td> 554 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 555 <tr valign="top"><td> 556 <h3 class="epydoc"><span class="sig"><span class="sig-name">has_stream</span>(<span class="sig-arg">self</span>)</span> 557 </h3> 558 </td><td align="right" valign="top" 559 ><span class="codelink"><a href="googleapiclient.http-pysrc.html#MediaIoBaseUpload.has_stream">source code</a></span> 560 </td> 561 </tr></table> 562 563 <pre class="literalblock"> 564Does the underlying upload support a streaming interface. 565 566Streaming means it is an io.IOBase subclass that supports seek, i.e. 567seekable() returns True. 568 569Returns: 570 True if the call to stream() will return an instance of a seekable io.Base 571 subclass. 572 573</pre> 574 <dl class="fields"> 575 <dt>Overrides: 576 <a href="googleapiclient.http.MediaUpload-class.html#has_stream">MediaUpload.has_stream</a> 577 </dt> 578 </dl> 579</td></tr></table> 580</div> 581<a name="stream"></a> 582<div> 583<table class="details" border="1" cellpadding="3" 584 cellspacing="0" width="100%" bgcolor="white"> 585<tr><td> 586 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 587 <tr valign="top"><td> 588 <h3 class="epydoc"><span class="sig"><span class="sig-name">stream</span>(<span class="sig-arg">self</span>)</span> 589 </h3> 590 </td><td align="right" valign="top" 591 ><span class="codelink"><a href="googleapiclient.http-pysrc.html#MediaIoBaseUpload.stream">source code</a></span> 592 </td> 593 </tr></table> 594 595 <pre class="literalblock"> 596A stream interface to the data being uploaded. 597 598Returns: 599 The returned value is an io.IOBase subclass that supports seek, i.e. 600 seekable() returns True. 601 602</pre> 603 <dl class="fields"> 604 <dt>Overrides: 605 <a href="googleapiclient.http.MediaUpload-class.html#stream">MediaUpload.stream</a> 606 </dt> 607 </dl> 608</td></tr></table> 609</div> 610<a name="to_json"></a> 611<div> 612<table class="details" border="1" cellpadding="3" 613 cellspacing="0" width="100%" bgcolor="white"> 614<tr><td> 615 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 616 <tr valign="top"><td> 617 <h3 class="epydoc"><span class="sig"><span class="sig-name">to_json</span>(<span class="sig-arg">self</span>)</span> 618 </h3> 619 </td><td align="right" valign="top" 620 ><span class="codelink"><a href="googleapiclient.http-pysrc.html#MediaIoBaseUpload.to_json">source code</a></span> 621 </td> 622 </tr></table> 623 624 <pre class="literalblock"> 625This upload type is not serializable. 626 627</pre> 628 <dl class="fields"> 629 <dt>Overrides: 630 <a href="googleapiclient.http.MediaUpload-class.html#to_json">MediaUpload.to_json</a> 631 </dt> 632 </dl> 633</td></tr></table> 634</div> 635<br /> 636<!-- ==================== NAVIGATION BAR ==================== --> 637<table class="navbar" border="0" width="100%" cellpadding="0" 638 bgcolor="#a0c0ff" cellspacing="0"> 639 <tr valign="middle"> 640 <!-- Home link --> 641 <th> <a 642 href="googleapiclient-module.html">Home</a> </th> 643 644 <!-- Tree link --> 645 <th> <a 646 href="module-tree.html">Trees</a> </th> 647 648 <!-- Index link --> 649 <th> <a 650 href="identifier-index.html">Indices</a> </th> 651 652 <!-- Help link --> 653 <th> <a 654 href="help.html">Help</a> </th> 655 656 <th class="navbar" width="100%"></th> 657 </tr> 658</table> 659<table border="0" cellpadding="0" cellspacing="0" width="100%%"> 660 <tr> 661 <td align="left" class="footer"> 662 Generated by Epydoc 3.0.1 on Mon Jun 5 13:38:40 2017 663 </td> 664 <td align="right" class="footer"> 665 <a target="mainFrame" href="http://epydoc.sourceforge.net" 666 >http://epydoc.sourceforge.net</a> 667 </td> 668 </tr> 669</table> 670 671<script type="text/javascript"> 672 <!-- 673 // Private objects are initially displayed (because if 674 // javascript is turned off then we want them to be 675 // visible); but by default, we want to hide them. So hide 676 // them unless we have a cookie that says to show them. 677 checkCookie(); 678 // --> 679</script> 680</body> 681</html> 682