dify icon indicating copy to clipboard operation
dify copied to clipboard

ALIYUN OSS STORAGE will encounter a NoneType error when self.folder is not set.

Open RinaisSuper opened this issue 5 months ago • 2 comments

Self Checks

  • [X] This is only for bug report, if you would like to ask a question, please head to Discussions.
  • [X] I have searched for existing issues search for existing issues, including closed ones.
  • [X] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • [X] Please do not modify this template :) and fill in all the required fields.

Dify version

0.8.0

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

Enabling the Aliyun storage store will result in an error.

    def save(self, filename, data):
        if not self.folder or self.folder.endswith("/"):
            filename = self.folder + filename
        else:
            filename = self.folder + "/" + filename
        self.client.put_object(filename, data)

if self.folder not set,the + operation will throw exception

✔️ Expected Behavior

Runs normally when the folder is not set.

❌ Actual Behavior

Runs failed when the folder is not set.

RinaisSuper avatar Sep 11 '24 03:09 RinaisSuper