sibblegp / b2blaze

b2blaze
MIT License
607 stars 32 forks source link

Fixed deleting files with spaces in filename #24

Closed andrewhu closed 5 years ago

andrewhu commented 5 years ago

url encoding filenames will cause a fileName not found error in b2_file.delete(). You need to keep the filename as is.

def delete(self):
    ...
    params = {
        'fileId': self.file_id,
        'fileName': b2_url_encode(self.file_name)
    }

should be

def delete(self):
    ...
    params = {
        'fileId': self.file_id,
        'fileName': self.file_name
    }