我是iOS开发者,我想在主页展示列表展示小图,使用getThumbnailURLWithScaleToFit返回的URL,用SDWebimage处理,后来发现速度没变。
打开来看是大图,参数怎么修改,或者按照一些七牛云的一些说明https://segmentfault.com/a/1190000000390039设置了,获取到新的URL下载下来一看,新图和原图大小和尺寸一点都没变,这是怎么回事?
用了其他的getThumbnail系列的方法也没有效果。
我的LeanCloud版本是最新的5.0.1,希望管理员看到能尽快回复一下。
有没有同样的人遇到相同的问题??可以提供点建议
这是我的代码:

AVFile *file = [AVFile fileWithURL:photoUrlStr];
NSString *thumbNailUrlStr = [file getThumbnailURLWithScaleToFit:YES width:85 height:110 quality:10 format:nil];   
NSURL *photoUrl = [NSURL URLWithString:thumbNailUrlStr];
[self.coverImageView sd_setImageWithURL:photoUrl placeholderImage:[UIImage imageNamed:@"home_userholder"] options:SDWebImageRetryFailed completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
        if (!error) {
            UIImage *scaledimage = [image scaleToSize:CGSizeMake(KScreenW*0.25, KHomeItemHeight)] ;
            self.coverImageView.image = scaledimage;
        } else {
            NSLog(@"---------%@", error.localizedDescription);
        }
}];

请将 thumbNailUrlStr 的值打印出来看看,看看最终缩略图的 URL 是什么。

Printing description of photoUrlStr:  这是LeanCloud存储里的原图的URL
https://s3.amazonaws.com/avos-cloud-hlvzy9l4c1nc/4ONZjgC9T5CpBNfkYcU7STC.jpg
https://s3.amazonaws.com/avos-cloud-hlvzy9l4c1nc/r9U9t7Ak9NEUoMGNPjaNGxC.jpg

Printing description of thumbNailUrlStr:   这是返回的缩略图URL
https://s3.amazonaws.com/avos-cloud-hlvzy9l4c1nc/4ONZjgC9T5CpBNfkYcU7STC.jpg?imageView/2/w/102/h/130/q/10
https://s3.amazonaws.com/avos-cloud-hlvzy9l4c1nc/r9U9t7Ak9NEUoMGNPjaNGxC.jpg?imageView/2/w/102/h/130/q/10

我发现缩略图URLString的参数再怎么修改好像也是没效果的,返回的图片都是原图

您好,目前缩略图的确只支持七牛,还不支持亚马逊 s3 的图片。
s3 本身还不直接支持缩略图,我们稍后会在文档中给予提示。