|
|
@ -18,21 +18,22 @@ import java.util.Date; |
|
|
|
|
|
|
|
|
|
|
|
public class OssDownloadHttpHandler extends BaseHttpHandler { |
|
|
|
public class OssDownloadHttpHandler extends BaseHttpHandler { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public RequestMethod getMethod() { |
|
|
|
public RequestMethod getMethod() { |
|
|
|
return RequestMethod.POST; |
|
|
|
return RequestMethod.POST; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public String getPath() { |
|
|
|
public String getPath() { |
|
|
|
return "/oss/download"; |
|
|
|
return "/oss/download"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public boolean isPublic() { |
|
|
|
public boolean isPublic() { |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public void handle(HttpServletRequest req, HttpServletResponse res) throws Exception { |
|
|
|
public void handle(HttpServletRequest req, HttpServletResponse res) throws Exception { |
|
|
|
String bucket = NetworkKit.getHTTPRequestParameter(req, "bucket"); |
|
|
|
String bucket = NetworkKit.getHTTPRequestParameter(req, "bucket"); |
|
|
|
String directory = NetworkKit.getHTTPRequestParameter(req, "directory"); |
|
|
|
String directory = NetworkKit.getHTTPRequestParameter(req, "directory"); |
|
|
|