import OSS from 'ali-oss'
const client = new OSS({
    accessKeyId: 'STS.NSz4JRBvYaYfAom59scqdAxyM',
    accessKeySecret: 'CoweobBccMPKbyMQMX4gEDz6r8aBDBk9FCo5BkgkePUd',
    expiration: '2023-11-27T12:07:15Z',
    stsToken:
        'CAIS6wF1q6Ft5B2yfSjIr5DPf/Dmr6l41puNQ0nc0Tkmb/5Irr3Srzz2IHhMe3VoCO0atv0+nW1S7f0Zlq1uUJJfHbhJsSbZt8Y5yxioRqacke7XhOV2pf/IMGyXDAGBr622Su7lTdTbV+6wYlTf7EFayqf7cjPQND7Mc+f+6/hdY88QQxOzYBdfGd5SPXECksIBMmbLPvvfWXyDwEioVRIz5VIk1DIuufrun5TMtSCz1gOqlrUnwK3qOYWhYsVWO5Nybsy4xuQedNCaiHYPt0Abqfsu1f0dpG2c5YqHY15K+FCcPuPY4ibB/tb96itTGoABohuUPdjrjETtBIL/MYdfSM8tkyy7eg49KU9v8GSDxFi3KomoKlVXF4d7mLlIQkxBSYL2SKFD106mfy3YNumyoBnmizfMwakVFn6t4cCvTDWnqkX60xWtsVwlO3m5zoJbEyv5sKa00ps+Tn65sS8cybF1k91DXIhQJxAOjrIcX98gAA==',
    region: 'oss-cn-hangzhou',
    bucket: 'zm-shorts'
})

export async function sign(obj) {
    const url = client.signatureUrl(obj)
    console.log(url)
    return url
}
