mirror of
https://github.com/kekingcn/kkFileView.git
synced 2026-04-19 22:28:38 +00:00
新增markdown格式预览支持
This commit is contained in:
@@ -58,9 +58,9 @@ public class DownloadUtils {
|
||||
URL url = new URL(urlStr);
|
||||
if (url.getProtocol() != null && (url.getProtocol().toLowerCase().startsWith("file")||url.getProtocol().toLowerCase().startsWith("http"))) {
|
||||
byte[] bytes = getBytesFromUrl(urlStr);
|
||||
OutputStream os = new FileOutputStream(new File(realPath));
|
||||
OutputStream os = new FileOutputStream(realPath);
|
||||
saveBytesToOutStream(bytes, os);
|
||||
} else if (url.getProtocol() != null && "ftp".equals(url.getProtocol().toLowerCase())) {
|
||||
} else if (url.getProtocol() != null && "ftp".equalsIgnoreCase(url.getProtocol())) {
|
||||
String ftpUsername = fileUtils.getUrlParameterReg(fileAttribute.getUrl(), URL_PARAM_FTP_USERNAME);
|
||||
String ftpPassword = fileUtils.getUrlParameterReg(fileAttribute.getUrl(), URL_PARAM_FTP_PASSWORD);
|
||||
String ftpControlEncoding = fileUtils.getUrlParameterReg(fileAttribute.getUrl(), URL_PARAM_FTP_CONTROL_ENCODING);
|
||||
|
||||
Reference in New Issue
Block a user