标签:load pyse ons 对象存储 div 调用 UNC rom zip
import oss2 ACCESS_KEY_ID = ‘LTAIF85FxvOeg3o8‘ ACCESS_KEY_SECRET = ‘8cLbVNSv0l4W5kpMkdJZoL5hUqyLKm‘ BUCKET_NAME = "pyserver" HOST_NAME = ‘oss-cn-hangzhou.aliyuncs.com‘ def upload(file_name, file_path): bucket = oss2.Bucket(oss2.Auth(ACCESS_KEY_ID, ACCESS_KEY_SECRET), HOST_NAME, BUCKET_NAME) res = bucket.put_object_from_file(file_name, file_path) print(res.resp.response.url) if __name__ == "__main__": upload("dxrj1.0.2.zip", ‘./dxrj1.0.2.zip‘)
标签:load pyse ons 对象存储 div 调用 UNC rom zip
原文地址:https://www.cnblogs.com/blog-rui/p/11029445.html