如何使用 Python 的 upyun 包上传图片避免上下翻转(已解决,我的代码问题,不会删帖子...)?

我在使用 又拍云上传图片,但是python 的 upyun包,代码如下:

class **
    def __init__(self, debug = False):
        PASSWORD = "1bSNjS77Jj............"
        self.server_name = "https://yp-image-..........."
        self.up = upyun.UpYun("aigc-image", "aigcimage", PASSWORD, timeout=100, endpoint=upyun.ED_AUTO)
        self.server_image_dirs = "/data/images"
        self.upyun_root_path = "/aigcimage"
    def put_file(self, local_dirs, cloud_dirs):
        with open(local_dirs, 'rb') as f:
            res = self.up.put(cloud_dirs, f, checksum=True)
            print(res)

但是发现上传上去的图片,会上下翻转过来,怎么解决这个问题

希望保证图片正常

阅读 300
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题