前言:
fastdfs python提供两个库交互,一个py_client 是python2 的,python3的是py3Fdfs,python2的就不说了,基本上都是python3的,但是用py3Fdfs 这个API的bug蛮多的,这篇就说一个下载的bug吧
这是py3Fdfs下载接口的源码
def download_to_file(self, local_filename, remote_file_id, offset=0, down_bytes=0):
'''
Download a file from Storage server.
arguments:
@local_filename: string, local name of file
@remote_file_id: string, file_id of file that is on storage server
@offset: long
@downbytes: long
@return dict {
'Remote file_id' : remote_file_id,
'Content' : local_filename,
'Download size' : downloaded_size,
'Storage IP' : storage_ip
}
'''
tmp = split_remote_fileid(remote_file_id)
if not tmp:
raise DataError('[-] Error: remot