xiewenya/django-aliyun-oss2-storage

发现两个bug

mrgaolei opened this issue · 0 comments

class AliyunFile(File):
    def __init__(self, name, storage, mode):
        self._storage = storage
        self._name = name[len(self._storage.location)+1:]. # 这里+1,会造成返回的文件名切掉了第一个字母
        self._mode = mode
        self.file = six.BytesIO()
        self._is_dirty = False
        self._is_read = False
        super(AliyunFile, self).__init__(self.file, self.name) # 这里应该是self._name