Https://www.aliyun.com/act/aliyun/ossdoc.html?spm=5176.2020520105.103.16.jWqRON
OSS provides an interface, a bucket has more than one object, you can upload a picture of the object, access, can be set by the console image style, and then the OSS provides interface API, you can use this API to make picture calls and access
bucket = ' Image-demo '
object = ' example.jpg '
query = ' 100w_100h.jpg '
Object = object + ' @ ' + query
self.oss.get_object (Bucket, object)
Generate AK in the security token shortcut configuration
It's actually here.
Http://oss-cn-hangzhou.aliyuncs.com
Endpoint:endpoint represents the access domain name of the OSS external service,<p>yuzhixingxikeji.oss-cn-shanghai.aliyuncs.com</p>
That's the thing.
Oh, this time, it's endpoint.
ImportOss2
Auth= Oss2. Auth(' id ',' Password ')
Service= Oss2. Service(Auth' Endpoint ')
Print([B.name forBinchOss2. Bucketiterator(Service)])
This error was reported after AccessKey was created.oss2.exceptions.AccessDenied: {' status ': 403, ' details ': {' HostId ': ' oss-cn-shanghai.aliyuncs.com ', ' Message ': ' AccessDenied ', ' Code ': ' AccessDenied ', ' RequestID ': ' 5714de70c50250a33efb22a6}
The reason is that this is a sub-account access, but the bucket owner does not give you access permissions
So we need to set up the accesskey in the creation of the permissions, I put the user and the group are all permissions, and then the normal access to the
fromItertoolsImportIslice forBinchIslice (Oss2. Objectiterator (Bucket),Ten): Print (B.key)
This is the original
Oss2. Bucket(' http://oss-cn-hangzhou.aliyuncs.com ',' Yuzhixingxikeji ')
This is now.
Oss2. Bucket(' http://oss-cn-shanghai.aliyuncs.com ',' Yuzhixingxikeji ')
I did not find this, the original example of the endpoint did not change over, lying trough
From for notes (Wiz)
Oos Picture Python Reference