Beispiel #1
0
    def rapid_upload(self):
        """快速上传.

        如果失败, 就自动调用分片上传.
        """
        info = pcs.rapid_upload(self.cookie, self.tokens, self.row[SOURCEPATH_COL], self.row[PATH_COL])
        if info and info["md5"] and info["fs_id"]:
            self.emit("uploaded", self.row[FID_COL])
        else:
            self.slice_upload()
Beispiel #2
0
    def rapid_upload(self):
        '''快速上传.

        如果失败, 就自动调用分片上传.
        '''
        info = pcs.rapid_upload(self.cookie, self.tokens,
                                self.row[SOURCEPATH_COL], self.row[PATH_COL],
                                self.upload_mode)
        if info and info['md5'] and info['fs_id']:
            self.emit('uploaded', self.row[FID_COL])
        else:
            self.slice_upload()
Beispiel #3
0
    def rapid_upload(self):
        '''快速上传.

        如果失败, 就自动调用分片上传.
        '''
        info = pcs.rapid_upload(self.cookie, self.tokens,
                                self.row[SOURCEPATH_COL], self.row[PATH_COL],
                                self.upload_mode)
        if info and info['md5'] and info['fs_id']:
            self.emit('uploaded', self.row[FID_COL])
        else:
            self.slice_upload()
Beispiel #4
0
    def rapid_upload(self):
        '''快速上传.

        如果失败, 就自动调用分片上传.
        '''
        print('Uploader.rapid_upload!')
        info = pcs.rapid_upload(
            self.cookie, self.tokens,
            self.row[SOURCEPATH_COL], self.row[PATH_COL])
        if info and info['md5'] and info['fs_id']:
            self.emit('uploaded', self.row[FID_COL])
        else:
            print('Uploader.will use slice upload')
            self.is_slice_upload = True
            self.slice_upload()