oss

 

 

 

import oss2
'''
auth = oss2.Auth('您的AccessKeyId', '您的AccessKeySecret')
bucket = oss2.Bucket(auth, '您的Endpoint', '您的Bucket名')
bucket.put_object('remote.txt', 'content of object')
'''
kid,ks,ep,bn='LTANd5ryh9gt','s2P1Rk5BOV9UBrUk','oss-cn-beijing.aliyuncs.com','my-bucket'
auth = oss2.Auth(kid, ks)
bucket = oss2.Bucket(auth, ep, bn)
dddd=bucket.put_object('mydir_video/remorerete.txt', 'content ererer object')
f='49589871.mp4'
with open(f,'rb') as fr:
        dddd=bucket.put_object('mydir_video/my.mp4', fr.read())


dd=9

  http://my-bucket.oss-cn-beijing.aliyuncs.com/gen_mydir_video%2Fmy.mp4

posted @ 2018-04-21 11:37  papering  阅读(202)  评论(0编辑  收藏  举报