Compare commits

...

8 Commits
1.5 ... 1.7

Author SHA1 Message Date
zhaojun1998
791967f45e 💄 更新页面 2020-02-19 21:43:17 +08:00
zhaojun1998
d789436a16 ✏️ 修复拼写错误 2020-02-19 21:23:09 +08:00
zhaojun1998
96ab8ff7dd 🔖 发布 1.6 版 2020-02-18 21:10:25 +08:00
zhaojun1998
8809aca170 📝 更新页面 2020-02-18 21:08:53 +08:00
zhaojun1998
97106383b6 🐛 修复使用本地存储时, 文件名中包含 + 引发的无法下载的 BUG. 2020-02-18 20:10:20 +08:00
zhaojun1998
208da95234 🐛 修复不同操作系统, 可能出现的编码问题, 导致导入的数据库文件乱码. 2020-02-18 20:09:32 +08:00
zhaojun1998
d4c843f5f5 🐛 修复 OneDrive 文件夹中包含 + 号, 且文件夹中的内容大于 200 个时, 请求出错的 BUG. 2020-02-18 20:02:37 +08:00
zhaojun1998
d273fc9f12 📝 更新文档 2020-02-15 18:39:56 +08:00
14 changed files with 26 additions and 10 deletions

View File

@@ -10,6 +10,7 @@
前端基于 [h5ai](https://larsjung.de/h5ai/) 的原有功能使用 Vue 重新开发了一遍. 后端采用 SpringBoot, 数据库采用内嵌数据库.
预览地址: [https://zfile.jun6.net](https://zfile.jun6.net)
文档地址: [http://docs.zhaojun.im/zfile](http://docs.zhaojun.im/zfile)
## 系统特色

View File

@@ -12,7 +12,7 @@
<groupId>im.zhaojun</groupId>
<artifactId>zfile</artifactId>
<version>1.5</version>
<version>1.6</version>
<name>zfile</name>
<packaging>war</packaging>
<description>一个在线的文件浏览系统</description>
@@ -148,7 +148,7 @@
<configuration>
<jvms>
<jvm>-server</jvm>
<jvm>-Xmx512m</jvm>
<jvm>-Xmx300m -Xmx100m</jvm>
<jvm>-Djava.security.egd=file:/dev/./urandom</jvm>
</jvms>
</configuration>

View File

@@ -36,7 +36,7 @@ public class GlobalScheduleTask {
private SystemConfigService systemConfigService;
/**
* 项目启动 30 秒后, 每 15 分执行一次刷新 OneDrive Token 的定时任务.
* 项目启动 30 秒后, 每 15 分执行一次刷新 OneDrive Token 的定时任务.
*/
@Scheduled(fixedRate = 1000 * 60 * 15, initialDelay = 1000 * 30)
public void autoRefreshOneDriveToken() {

View File

@@ -37,7 +37,7 @@ public class LocalController {
AntPathMatcher apm = new AntPathMatcher();
String filePath = apm.extractPathWithinPattern(bestMatchPattern, path);
return export(new File(StringUtils.concatPath(localServiceImpl.getFilePath(), URLUtil.decode(filePath))));
return export(new File(StringUtils.concatPath(localServiceImpl.getFilePath(), filePath)));
}
private ResponseEntity<Object> export(File file) {

View File

@@ -90,7 +90,7 @@ public class LocalServiceImpl extends AbstractFileService implements FileService
@Override
public String getDownloadUrl(String path) {
SystemConfig usernameConfig = systemConfigRepository.findByKey(SystemConfigConstant.DOMAIN);
return URLUtil.encode(StringUtils.removeDuplicateSeparator(usernameConfig.getValue() + "/file/" + path));
return StringUtils.removeDuplicateSeparator(usernameConfig.getValue() + "/file/" + path);
}
public String getFilePath() {

View File

@@ -20,6 +20,8 @@ import org.springframework.http.ResponseEntity;
import org.springframework.web.client.RestTemplate;
import javax.annotation.Resource;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -100,6 +102,7 @@ public abstract class AbstractOneDriveService extends AbstractFileService {
String requestUrl;
if (nextLink != null) {
nextLink = nextLink.replace("+", "%2B");
requestUrl = URLUtil.decode(nextLink);
}else if ("/".equalsIgnoreCase(fullPath) || "".equalsIgnoreCase(fullPath)) {
requestUrl = DRIVER_ROOT_URL;

View File

@@ -17,6 +17,8 @@ spring:
datasource:
# 初始化数据导入
data: classpath*:db/data.sql
sql-script-encoding: utf-8
initialization-mode: always
continue-on-error: true
@@ -27,7 +29,7 @@ spring:
password: 123456
# MySQL 配置
# driver-class-name: com.mysql.jdbc.Driver
# driver-class-name: com.mysql.jdbc.Driver
# url: jdbc:mysql://127.0.0.1:3306/zfile?characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=false
# username: root
# password: 123456
@@ -46,6 +48,10 @@ spring:
gzipped: true
profiles:
active: prod
boot:
admin:
context-path: /act
zfile:
cache:
timeout: 300
@@ -69,4 +75,7 @@ jetcache:
local:
default:
type: caffeine
keyConvertor: fastjson
keyConvertor: fastjson

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/favicon.ico><title></title><link href=/css/adminIndex.a8c53261.css rel=prefetch><link href=/css/install.b4e8b552.css rel=prefetch><link href=/js/adminIndex.0916d17e.js rel=prefetch><link href=/js/dplayer.acc587f7.js rel=prefetch><link href=/js/install.0f6d1155.js rel=prefetch><link href=/css/app.398136f5.css rel=preload as=style><link href=/css/chunk-vendors.cb63319e.css rel=preload as=style><link href=/js/app.945e1d35.js rel=preload as=script><link href=/js/chunk-vendors.d1dab075.js rel=preload as=script><link href=/css/chunk-vendors.cb63319e.css rel=stylesheet><link href=/css/app.398136f5.css rel=stylesheet></head><body><noscript><strong>We're sorry but zfile doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/chunk-vendors.d1dab075.js></script><script src=/js/app.945e1d35.js></script></body></html>
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/favicon.ico><title></title><link href=/css/adminIndex.a8c53261.css rel=prefetch><link href=/css/install.b4e8b552.css rel=prefetch><link href=/js/adminIndex.0916d17e.js rel=prefetch><link href=/js/dplayer.acc587f7.js rel=prefetch><link href=/js/install.0f6d1155.js rel=prefetch><link href=/css/app.3bb7dcc6.css rel=preload as=style><link href=/css/chunk-vendors.418d8ce5.css rel=preload as=style><link href=/js/app.cdf0d948.js rel=preload as=script><link href=/js/chunk-vendors.d1dab075.js rel=preload as=script><link href=/css/chunk-vendors.418d8ce5.css rel=stylesheet><link href=/css/app.3bb7dcc6.css rel=stylesheet></head><body><noscript><strong>We're sorry but zfile doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/chunk-vendors.d1dab075.js></script><script src=/js/app.cdf0d948.js></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,3 @@
{
"baseUrl": ""
}