|
@@ -50,6 +50,7 @@ public class OssDownloadHandler extends SimpleChannelInboundHandler<HttpRequest>
|
|
|
|
|
|
|
|
ObjectMeta objectMeta = consoleService.getObjectMeta(httpHost, objectName);
|
|
ObjectMeta objectMeta = consoleService.getObjectMeta(httpHost, objectName);
|
|
|
if (objectMeta == null) {
|
|
if (objectMeta == null) {
|
|
|
|
|
+ log.error("ObjectMeta not found with object name {}", objectName);
|
|
|
sendError(ctx, HttpResponseStatus.NOT_FOUND);
|
|
sendError(ctx, HttpResponseStatus.NOT_FOUND);
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
@@ -89,6 +90,7 @@ public class OssDownloadHandler extends SimpleChannelInboundHandler<HttpRequest>
|
|
|
// 2. 打开物理文件
|
|
// 2. 打开物理文件
|
|
|
File file = new File(absolutePath);
|
|
File file = new File(absolutePath);
|
|
|
if (!file.exists()) {
|
|
if (!file.exists()) {
|
|
|
|
|
+ log.error("file not exists {}", absolutePath);
|
|
|
sendError(ctx, HttpResponseStatus.NOT_FOUND);
|
|
sendError(ctx, HttpResponseStatus.NOT_FOUND);
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|