Giter VIP home page Giter VIP logo

Comments (4)

xuyecan avatar xuyecan commented on August 18, 2024

此功能还未正式开放呢~
请以官网公告为准,到时候文档会更新的。

from aliyun-oss-ios-sdk.

senpng avatar senpng commented on August 18, 2024

已经解决了,需要使用图片服务的EndPoint。之后在ObjectKey后面拼接图片规则即可
Example:

    func oss_setThumb(objectKey: String) {
        oss_setImage(objectKey + "@!thumb");//自定义规则
    }

    func oss_setImage(objectKey: String) {

        guard let client = DataCenter.sharedDataCenter().client else {//client为OSSClient对象
            return;
        }

        let task = client.presignConstrainURLWithBucketName(AppConfig.OSSBucketName, withObjectKey: objectKey, withExpirationInterval: 60*60);

        if task.error == nil {
            if let result = task.result as? NSString {
                print(result);
            }
        } else {
            print("error: \(task.error)");
        }
    }

from aliyun-oss-ios-sdk.

xuyecan avatar xuyecan commented on August 18, 2024

嗯。。这个是以前的用法,x-oss-process参数是为即将要上的一个新功能准备的。我以为你问的是这个呢~不好意思。

from aliyun-oss-ios-sdk.

senpng avatar senpng commented on August 18, 2024

使用OSSGetObjectRequest,也是可以在objectKey后面拼接图片规则。如果使用的是图片服务的EndPoint。那x-oss-process的作用和在后面凭借图片规则效果是一样的,只不过格式变了

from aliyun-oss-ios-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.