秒传一个文件

        :param file_handler: 文件handler, e.g. open('file','rb')
        :type file_handler: file

        :param path: 上传到服务器的路径，包含文件名
        :type path: str

        :return: requests.Response

            .. note::
                * 文件已在服务器上存在，不上传，返回示例
                {

                    "path" : "/apps/album/1.jpg",

                    "size" : 372121,

                    "ctime" : 1234567890,

                    "mtime" : 1234567890,

                    "md5" : "cb123afcc12453543ef",

                    "fs_id" : 12345,

                    "isdir" : 0,

                    "request_id" : 12314124

                }

                * 文件不存在，需要上传

                {"errno":404,"info":[],"request_id":XXX}

                * 文件大小不足 256kb （slice-md5 == content-md5) 时

                {"errno":2,"info":[],"request_id":XXX}

                * 远程文件已存在

                {"errno":-8,"info":[],"request_id":XXX}

def rapidupload(self, file_handler, path, **kwargs):
        """秒传一个文件

        :param file_handler: 文件handler, e.g. open('file','rb')
        :type file_handler: file

        :param path: 上传到服务器的路径，包含文件名
        :type path: str

        :return: requests.Response

            .. note::
                * 文件已在服务器上存在，不上传，返回示例
                {

                    "path" : "/apps/album/1.jpg",

                    "size" : 372121,

                    "ctime" : 1234567890,

                    "mtime" : 1234567890,

                    "md5" : "cb123afcc12453543ef",

                    "fs_id" : 12345,

                    "isdir" : 0,

                    "request_id" : 12314124

                }

                * 文件不存在，需要上传

                {"errno":404,"info":[],"request_id":XXX}

                * 文件大小不足 256kb （slice-md5 == content-md5) 时

                {"errno":2,"info":[],"request_id":XXX}

                * 远程文件已存在

                {"errno":-8,"info":[],"request_id":XXX}


        """
        file_handler.seek(0, 2)
        _BLOCK_SIZE = 2 ** 20
        content_length = file_handler.tell()
        file_handler.seek(0)

        # 校验段为前 256kb
        first_256bytes = file_handler.read(256 * 1024)
        slice_md5 = md5(first_256bytes).hexdigest()

        content_crc32 = crc32(first_256bytes).conjugate()
        content_md5 = md5(first_256bytes)

        while True:
            block = file_handler.read(_BLOCK_SIZE)
            if not block:
                break
            # 更新crc32和md5校验值
            content_crc32 = crc32(block, content_crc32).conjugate()
            content_md5.update(block)

        data = {'path': path,
                'content-length': content_length,
                'content-md5': content_md5.hexdigest(),
                'slice-md5': slice_md5,
                'content-crc32': '%d' % (content_crc32.conjugate() & 0xFFFFFFFF)}
        logging.debug('RAPIDUPLOAD DATA ' + str(data))
        # url = 'http://pan.baidu.com/api/rapidupload'
        return self._request('rapidupload', 'rapidupload', data=data, **kwargs)