code: def FromStream(cls, stream, mime_type, total_size=None, auto_transfer=True,
                     gzip_encoded=False, **kwds):
          
          if mime_type is None:
              raise exceptions.InvalidUserInputError(
                  'No mime_type specified for stream')
          return cls(stream, mime_type, total_size=total_size,
                     close_stream=False, auto_transfer=auto_transfer,
                     gzip_encoded=gzip_encoded, **kwds)
docs: Create a new Upload object from a stream.