设置默认图片 @param picture 图片文件或者图片文件md5等 @param ext 图片扩展名,如果图片文件参数(picture)的值为md5时,需要加上后缀扩展名 @return link 图片url链接
(picture string, ext ...string)
| 256 | //@param ext 图片扩展名,如果图片文件参数(picture)的值为md5时,需要加上后缀扩展名 |
| 257 | //@return link 图片url链接 |
| 258 | func (c *CloudStore) getImageFromCloudStore(picture string, ext ...string) (link string) { |
| 259 | if len(ext) > 0 { |
| 260 | picture = picture + "." + ext[0] |
| 261 | } else if !strings.Contains(picture, ".") && len(picture) > 0 { |
| 262 | picture = picture + ".jpg" |
| 263 | } |
| 264 | if c == nil || c.client == nil { |
| 265 | return |
| 266 | } |
| 267 | |
| 268 | return c.GetSignURL(picture) |
| 269 | } |
| 270 | |
| 271 | func (c *CloudStore) GetSignURL(object string) (link string) { |
| 272 | var err error |
no test coverage detected