Giter VIP home page Giter VIP logo

zfile's Introduction

Z-File

https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square Codacy Badge https://img.shields.io/badge/springboot-2.0.6-orange.svg?style=flat-square GitHub tag (latest SemVer)

此项目是一个在线文件目录的程序, 支持各种对象存储和本地存储, 使用定位是个人放常用工具下载, 或做公共的文件库. 不会向多账户方向开发.

前端基于 h5ai 的原有功能使用 Vue 重新开发了一遍. 后端采用 SpringBoot, 数据库采用内嵌数据库.

预览地址: https://zfile.jun6.net

系统特色

  • 内存缓存 (免安装)
  • 内存数据库 (免安装)
  • 个性化配置
  • 自定义目录的 header 说明文件
  • 自定义 JS, CSS
  • 文件夹密码
  • 支持在线浏览文本文件, 视频, 图片, 音乐. (支持 FLV 和 HLS)
  • 文件/目录二维码
  • 缓存动态开启, 缓存自动刷新
  • 全局搜索
  • 支持 阿里云 OSS, FTP, 华为云 OBS, 本地存储, MINIO, OneDrive 国际/家庭/个人版, OneDrive 世纪互联版, 七牛云 KODO, 腾讯云 COS, 又拍云 USS.

快速开始

安装依赖环境:

# CentOS系统
yum install -y java-1.8.0-openjdk unzip

# Debian/Ubuntu系统
apt update
apt install -y openjdk-8-jre-headless unzip

如为更新程序, 则请先执行 rm -rf ~/zfile 清理旧程序. 首次安装请忽略此选项.

下载项目:

wget -P ~ https://c.jun6.net/ZFILE/zfile-1.2.war
cd ~
mkdir zfile && unzip zfile-1.2.war -d zfile && rm -rf zfile-1.2.war
chmod +x ~/zfile/bin/*.sh

程序的目录结构为:

├── zfile
    ├── META-INF
    ├── WEB-INF
    └── bin
        ├── start.sh    # 启动脚本
        └── stop.sh     # 停止脚本
        ├── restart.sh  # 重启脚本

启动项目:

 ~/zfile/bin/start.sh

篇幅有限, 更详细的安装教程请参考: 安装文档

访问地址:

用户前台: http://127.0.0.1:8080/#/main

初始安装: http://127.0.0.1:8080/#/install

管理后台: http://127.0.0.1:8080/#/admin

OneDrive 使用教程.

访问地址进行授权, 获取 accessToken 和 refreshToken:

国际/家庭/个人版:

https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=09939809-c617-43c8-a220-a93c1513c5d4&response_type=code&redirect_uri=https://zfile.jun6.net/onedirve/callback&scope=offline_access%20User.Read%20Files.ReadWrite.All

世纪互联版:

https://login.chinacloudapi.cn/common/oauth2/v2.0/authorize?client_id=4a72d927-1907-488d-9eb2-1b465c53c1c5&response_type=code&redirect_uri=https://zfile.jun6.net/onedirve/china-callback&scope=offline_access%20User.Read%20Files.ReadWrite.All

然后分别填写至访问令牌和刷新令牌即可:

http://cdn.jun6.net/2020-01-24_18-57-06.png

运行环境

  • JDK: 1.8
  • 缓存: caffeine
  • 数据库: h2/mysql

预览

前台首页 后台设置 存储策略 缓存管理

常见问题

数据库

缓存默认支持 h2mysql, 前者为嵌入式数据库, 无需安装, 但后者相对性能更好.

默认路径

默认 H2 数据库文件地址: ~/.zfile/db/, ~ 表示用户目录, windows 为 C:/Users/用户名/, linux 为 /home/用户名/, root 用户为 /root/

头尾文件和加密文件

  • 目录头部显示文件名为 header.md
  • 目录需要密码访问, 添加文件 password.txt (无法拦截此文件被下载, 但可以改名文件)

TODO

  • API 支持 点击查看文档
  • 更方便的部署方式
  • 文本预览更换更好用的编辑器
  • 后台支持上传、编辑、删除等操作
  • WebDav 支持
  • Docker 支持

支持作者

如果本项目对你有帮助,请作者喝杯咖啡吧。

zfile's People

Contributors

zhaojun1998 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.