跳转OSS云存储的压缩规则
This commit is contained in:
@@ -261,11 +261,10 @@ public class FileController extends BaseController {
|
||||
String requestURL = config.getFileServer();
|
||||
for (FileRecord record : result.getList()) {
|
||||
if (StrUtil.isNotBlank(record.getPath())) {
|
||||
record.setUrl(record.getPath());
|
||||
if (FileServerUtil.isImage(record.getContentType())) {
|
||||
record.setThumbnail(record.getPath() + "?x-oss-process=image/resize,m_fixed,w_100,h_100/quality,Q_90");
|
||||
record.setPath(record.getPath() + "?x-oss-process=image/resize,m_fixed,w_100,w_750/quality,Q_90");
|
||||
record.setUrl(record.getPath() + "?x-oss-process=image/resize,m_fixed,w_100,w_1680/quality,Q_90");
|
||||
record.setPath(record.getPath() + "?x-oss-process=image/resize,m_fixed,w_750/quality,Q_90");
|
||||
record.setUrl(record.getPath() + "?x-oss-process=image/resize,m_fixed,w_1680/quality,Q_90");
|
||||
}
|
||||
record.setDownloadUrl(record.getPath());
|
||||
}
|
||||
@@ -281,11 +280,10 @@ public class FileController extends BaseController {
|
||||
String requestURL = config.getFileServer();
|
||||
for (FileRecord record : records) {
|
||||
if (StrUtil.isNotBlank(record.getPath())) {
|
||||
record.setUrl(requestURL + record.getPath());
|
||||
if (FileServerUtil.isImage(record.getContentType())) {
|
||||
record.setThumbnail(record.getPath() + "?x-oss-process=image/resize,m_fixed,w_100,h_100/quality,Q_90");
|
||||
record.setPath(record.getPath() + "?x-oss-process=image/resize,m_fixed,w_100,w_750/quality,Q_90");
|
||||
record.setUrl(record.getPath() + "?x-oss-process=image/resize,m_fixed,w_100,w_1680/quality,Q_90");
|
||||
record.setPath(record.getPath() + "?x-oss-process=image/resize,m_fixed,w_750/quality,Q_90");
|
||||
record.setUrl(record.getPath() + "?x-oss-process=image/resize,m_fixed,w_1680/quality,Q_90");
|
||||
}
|
||||
record.setDownloadUrl(record.getPath());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user