|
1 |
| - |
| 1 | +# FileCodeBox - 文件快递柜 |
2 | 2 |
|
3 | 3 | <div align="center">
|
4 |
| -<h1>文件快递柜-轻量</h1> |
5 |
| -<p><em>匿名口令分享文本,文件,像拿快递一样取文件</em></p> |
6 |
| -<p>交流Q群:739673698</p> |
| 4 | + |
| 5 | +<img src="https://fastly.jsdelivr.net/gh/vastsa/FileCodeBox@V1.6/static/banners/img_1.png" alt="FileCodeBox Logo"> |
| 6 | + |
| 7 | +<p><em>匿名口令分享文本和文件,像拿快递一样取文件</em></p> |
| 8 | + |
| 9 | +[](https://github.com/vastsa/FileCodeBox/stargazers) |
| 10 | +[](https://github.com/vastsa/FileCodeBox/network) |
| 11 | +[](https://github.com/vastsa/FileCodeBox/issues) |
| 12 | +[](https://github.com/vastsa/FileCodeBox/blob/master/LICENSE) |
| 13 | +[](https://qm.qq.com/cgi-bin/qm/qr?k=eMXxqKZBrwjWYgPgpBjhQ8-q8_eK-BoR&jump_from=webapi&authKey=6vXVaJ3nXgEVoQzV9OFX+XvRyPJhJd7l9QQhBkZz+qBk1YYqxUXyqBuPL4WLkjMj) |
| 14 | +[](https://www.python.org) |
| 15 | +[](https://fastapi.tiangolo.com) |
| 16 | +[](https://v3.vuejs.org) |
| 17 | + |
| 18 | +[English](./readme_en.md) | [部署教程](https://github.com/vastsa/FileCodeBox/wiki/部署教程) | [常见问题](https://github.com/vastsa/FileCodeBox/wiki/常见问题) |
| 19 | + |
7 | 20 | </div>
|
8 | 21 |
|
| 22 | +## 📝 项目简介 |
9 | 23 |
|
10 |
| ---- |
| 24 | +FileCodeBox 是一个基于 FastAPI + Vue3 开发的轻量级文件分享工具。它允许用户通过简单的方式分享文本和文件,接收者只需要一个提取码就可以取得文件,就像从快递柜取出快递一样简单。 |
11 | 25 |
|
| 26 | +## 🖼️ 功能预览 |
12 | 27 |
|
13 |
| -<div align="center" style="text-align: center;margin: 20px"> |
14 |
| - <a href="./readme.md">简体中文</a> | |
15 |
| - <a href="./readme_en.md">English</a> | |
16 |
| - <a href="https://github.com/vastsa/FileCodeBox/wiki/%E9%83%A8%E7%BD%B2%E6%95%99%E7%A8%8B">部署教程</a> | |
17 |
| - <a href="https://github.com/vastsa/FileCodeBox/wiki/%E9%83%A8%E7%BD%B2%E6%95%99%E7%A8%8B">常见问题</a> |
| 28 | +<div align="center"> |
| 29 | +<h3> |
| 30 | +<a href="https://github.com/vastsa/FileCodeBoxFronted" target="_blank"> |
| 31 | +<img src="https://img.shields.io/badge/Frontend-FileCodeBoxFronted-blue?style=for-the-badge&logo=github" alt="前端仓库"> |
| 32 | +</a> |
| 33 | + |
| 34 | +<a href="https://share.lanol.cn" target="_blank"> |
| 35 | +<img src="https://img.shields.io/badge/Demo-share.lanol.cn-green?style=for-the-badge&logo=internet-explorer" alt="演示站点"> |
| 36 | +</a> |
| 37 | +</h3> |
18 | 38 | </div>
|
19 | 39 |
|
20 |
| -## 新版预览 |
21 |
| -前端开源地址:https://github.com/vastsa/FileCodeBoxFronted |
| 40 | +### 新版界面 |
| 41 | +<div align="center"> |
| 42 | +<table> |
| 43 | +<tr> |
| 44 | +<td><img src="./.github/images/img_7.png" alt="文件上传" title="文件上传界面"></td> |
| 45 | +<td><img src="./.github/images/img_8.png" alt="文本分享" title="文本分享界面"></td> |
| 46 | +</tr> |
| 47 | +<tr> |
| 48 | +<td><img src="./.github/images/img_10.png" alt="文件管理" title="文件管理界面"></td> |
| 49 | +<td><img src="./.github/images/img_9.png" alt="系统设置" title="系统设置界面"></td> |
| 50 | +</tr> |
| 51 | +<tr> |
| 52 | +<td><img src="./.github/images/img_11.png" alt="移动端" title="移动端界面"></td> |
| 53 | +<td><img src="./.github/images/img_12.png" alt="深色模式" title="深色模式界面"></td> |
| 54 | +</tr> |
| 55 | +<tr> |
| 56 | +<td><img src="./.github/images/img_13.png" alt="国际化" title="国际化支持"></td> |
| 57 | +<td><img src="./.github/images/img_14.png" alt="响应式" title="响应式设计"></td> |
| 58 | +</tr> |
| 59 | +</table> |
| 60 | +</div> |
22 | 61 |
|
23 |
| -预览:share.lanol.cn |
24 |
| -<table style="width:100%"> |
25 |
| -<tr style="width: 100%"> |
26 |
| -<td style="width: 50%"><img src="./.github/images/img_7.png" alt="寄文件"></td> |
27 |
| -<td style="width: 50%"><img src="./.github/images/img_8.png" alt="寄文件"></td> |
| 62 | +### 经典界面 |
| 63 | +<div align="center"> |
| 64 | +<table> |
| 65 | +<tr> |
| 66 | +<td><img src="./.github/images/img.png" alt="首页" title="首页界面"></td> |
| 67 | +<td><img src="./.github/images/img_1.png" alt="上传" title="上传界面"></td> |
28 | 68 | </tr>
|
29 |
| -<tr style="width: 100%"> |
30 |
| -<td style="width: 50%"><img src="./.github/images/img_10.png" alt="寄文件"></td> |
31 |
| -<td style="width: 50%"><img src="./.github/images/img_9.png" alt="寄文件"></td> |
| 69 | +<tr> |
| 70 | +<td><img src="./.github/images/img_2.png" alt="管理" title="管理界面"></td> |
| 71 | +<td><img src="./.github/images/img_3.png" alt="设置" title="设置界面"></td> |
32 | 72 | </tr>
|
33 |
| -<tr style="width: 100%"> |
34 |
| -<td style="width: 50%"><img src="./.github/images/img_11.png" alt="寄文件"></td> |
35 |
| -<td style="width: 50%"><img src="./.github/images/img_12.png" alt="寄文件"></td> |
| 73 | +<tr> |
| 74 | +<td><img src="./.github/images/img_4.png" alt="分享" title="分享界面"></td> |
| 75 | +<td><img src="./.github/images/img_5.png" alt="下载" title="下载界面"></td> |
36 | 76 | </tr>
|
37 |
| -<tr style="width: 100%"> |
38 |
| -<td style="width: 50%"><img src="./.github/images/img_13.png" alt="寄文件"></td> |
39 |
| -<td style="width: 50%"><img src="./.github/images/img_14.png" alt="寄文件"></td> |
| 77 | +</table> |
| 78 | +</div> |
| 79 | + |
| 80 | +## 🎯 应用场景 |
| 81 | + |
| 82 | +<table> |
| 83 | +<tr> |
| 84 | +<td align="center"> |
| 85 | +<h4>📁 临时文件分享</h4> |
| 86 | +快速分享单个文件,无需注册登录 |
| 87 | +</td> |
| 88 | +<td align="center"> |
| 89 | +<h4>📝 文本快速分享</h4> |
| 90 | +分享代码片段、文本内容等 |
| 91 | +</td> |
| 92 | +<td align="center"> |
| 93 | +<h4>🕶️ 匿名文件传输</h4> |
| 94 | +保护隐私的文件传输方式 |
| 95 | +</td> |
| 96 | +</tr> |
| 97 | +<tr> |
| 98 | +<td align="center"> |
| 99 | +<h4>💾 临时文件存储</h4> |
| 100 | +支持设置过期时间的文件存储 |
| 101 | +</td> |
| 102 | +<td align="center"> |
| 103 | +<h4>🔄 跨平台传输</h4> |
| 104 | +在不同设备间快速传输文件 |
| 105 | +</td> |
| 106 | +<td align="center"> |
| 107 | +<h4>🌐 小型分享服务</h4> |
| 108 | +搭建私有的文件分享服务 |
| 109 | +</td> |
40 | 110 | </tr>
|
41 | 111 | </table>
|
42 | 112 |
|
43 |
| -## 部分截图 |
| 113 | +## ✨ 核心特性 |
| 114 | + |
| 115 | +<table> |
| 116 | +<tr> |
| 117 | +<td align="center"> |
| 118 | +<h4>🚀 轻量简洁</h4> |
| 119 | +基于 FastAPI + SQLite3 + Vue3 + ElementUI,部署简单,性能出色 |
| 120 | +</td> |
| 121 | +<td align="center"> |
| 122 | +<h4>📤 便捷上传</h4> |
| 123 | +支持复制粘贴、拖拽上传,操作简单直观 |
| 124 | +</td> |
| 125 | +<td align="center"> |
| 126 | +<h4>📦 多种类型</h4> |
| 127 | +支持文本和各类文件的分享 |
| 128 | +</td> |
| 129 | +</tr> |
| 130 | +<tr> |
| 131 | +<td align="center"> |
| 132 | +<h4>🔒 安全机制</h4> |
44 | 133 |
|
45 |
| -<table style="width:100%"> |
46 |
| -<tr style="width: 100%"> |
47 |
| -<td style="width: 50%"><img src="./.github/images/img.png" alt="寄文件"></td> |
48 |
| -<td style="width: 50%"><img src="./.github/images/img_1.png" alt="寄文件"></td> |
| 134 | +- IP 限制上传次数 |
| 135 | +- 错误次数限制 |
| 136 | +- 文件过期机制 |
| 137 | +</td> |
| 138 | +<td align="center"> |
| 139 | +<h4>🎫 提取码分享</h4> |
| 140 | +随机提取码,可自定义次数及有效期 |
| 141 | +</td> |
| 142 | +<td align="center"> |
| 143 | +<h4>🌍 多语言支持</h4> |
| 144 | +支持中文简体、繁体及英文 |
| 145 | +</td> |
49 | 146 | </tr>
|
50 |
| -<tr style="width: 100%"> |
51 |
| -<td style="width: 50%"><img src="./.github/images/img_2.png" alt="寄文件"></td> |
52 |
| -<td style="width: 50%"><img src="./.github/images/img_3.png" alt="寄文件"></td> |
| 147 | +<tr> |
| 148 | +<td align="center"> |
| 149 | +<h4>🎭 匿名分享</h4> |
| 150 | +无需注册登录,保护隐私 |
| 151 | +</td> |
| 152 | +<td align="center"> |
| 153 | +<h4>🛠 管理面板</h4> |
| 154 | +文件管理和系统配置 |
| 155 | +</td> |
| 156 | +<td align="center"> |
| 157 | +<h4>🐳 容器部署</h4> |
| 158 | +支持 Docker 一键部署 |
| 159 | +</td> |
53 | 160 | </tr>
|
54 |
| -<tr style="width: 100%"> |
55 |
| -<td style="width: 50%"><img src="./.github/images/img_4.png" alt="寄文件"></td> |
56 |
| -<td style="width: 50%"><img src="./.github/images/img_5.png" alt="寄文件"></td> |
| 161 | +<tr> |
| 162 | +<td align="center"> |
| 163 | +<h4>💾 存储扩展</h4> |
| 164 | +支持本地存储、S3 协议、OneDrive 等 |
| 165 | +</td> |
| 166 | +<td align="center"> |
| 167 | +<h4>📱 响应式设计</h4> |
| 168 | +支持移动端访问 |
| 169 | +</td> |
| 170 | +<td align="center"> |
| 171 | +<h4>💻 终端支持</h4> |
| 172 | +支持命令行下载 |
| 173 | +</td> |
57 | 174 | </tr>
|
58 | 175 | </table>
|
59 | 176 |
|
60 |
| -## 主要特色 |
61 |
| - |
62 |
| -- [x] **轻量简洁:** 项目基于Fastapi + Sqlite3 + Vue3 + ElementUI |
63 |
| -- [x] **轻松上传:** 支持复制粘贴和拖拽选择 |
64 |
| -- [x] **多种类型:** 支持文本和文件 |
65 |
| -- [x] **防止爆破:** 错误次数限制 |
66 |
| -- [x] **防止滥用:** IP限制上传次数 |
67 |
| -- [x] **口令分享:** 随机口令,存取文件,自定义次数及有效期 |
68 |
| -- [x] **国际化:** 支持中文简体、繁体以及英文等 |
69 |
| -- [x] **匿名分享:** 无需注册,无需登录 |
70 |
| -- [x] **管理面板:** 查看和删除文件 |
71 |
| -- [x] **一键部署:** 支持Docker一键部署 |
72 |
| -- [x] **自由拓展:** 支持S3协议和本地文件流,可根据需求在storage文件中新增存储引擎 |
73 |
| -- [x] **简单明了:** 适合新手练手项目 |
74 |
| -- [x] **终端下载:** 终端命令`wget https://share.lanol.cn/share/select?code=83432` |
75 |
| - |
76 |
| -## Badges |
77 |
| -<div align="center"> |
78 |
| -<a href="https://hellogithub.com/repository/75ad7ffedd404a6485b4d621ec5b47e6" target="_blank"><img src="https://api.hellogithub.com/v1/widgets/recommend.svg?rid=75ad7ffedd404a6485b4d621ec5b47e6&claim_uid=beSz6INEkCM4mDH" alt="Featured|HelloGitHub" style="width: 250px; height: 54px;" width="250" height="54" /></a> |
79 |
| -</div> |
| 177 | +## 🚀 快速开始 |
80 | 178 |
|
81 |
| -## 状态 |
| 179 | +### Docker 部署 |
82 | 180 |
|
83 |
| - |
| 181 | +```bash |
| 182 | +docker run -d --name filecode \ |
| 183 | + -p 12345:12345 \ |
| 184 | + -v /opt/filecode:/app/data \ |
| 185 | + --restart=always \ |
| 186 | + vastsa/filecode |
| 187 | +``` |
84 | 188 |
|
85 |
| -## Star History |
| 189 | +### 手动部署 |
86 | 190 |
|
87 |
| -[](https://star-history.com/#vastsa/FileCodeBox&Date) |
| 191 | +1. 克隆项目 |
| 192 | +```bash |
| 193 | +git clone https://github.com/vastsa/FileCodeBox.git |
| 194 | +``` |
88 | 195 |
|
| 196 | +2. 安装依赖 |
| 197 | +```bash |
| 198 | +cd FileCodeBox |
| 199 | +pip install -r requirements.txt |
| 200 | +``` |
| 201 | + |
| 202 | +3. 启动服务 |
| 203 | +```bash |
| 204 | +python main.py |
| 205 | +``` |
| 206 | + |
| 207 | +## 📖 使用说明 |
| 208 | + |
| 209 | +### 分享文件 |
| 210 | +1. 打开网页,点击"分享文件" |
| 211 | +2. 选择或拖拽文件 |
| 212 | +3. 设置过期时间和次数 |
| 213 | +4. 获取提取码 |
| 214 | + |
| 215 | +### 获取文件 |
| 216 | +1. 打开网页,输入提取码 |
| 217 | +2. 点击获取 |
| 218 | +3. 下载文件或查看文本 |
| 219 | + |
| 220 | +### 管理面板 |
| 221 | +1. 访问 `/admin` |
| 222 | +2. 输入管理员密码 |
| 223 | +3. 管理文件和配置 |
| 224 | + |
| 225 | +## 🛠 开发指南 |
| 226 | + |
| 227 | +### 项目结构 |
| 228 | +``` |
| 229 | +FileCodeBox/ |
| 230 | +├── apps/ # 应用代码 |
| 231 | +│ ├── admin/ # 管理后台 |
| 232 | +│ └── base/ # 基础功能 |
| 233 | +├── core/ # 核心功能 |
| 234 | +├── data/ # 数据目录 |
| 235 | +└── fcb-fronted/ # 前端代码 |
| 236 | +``` |
| 237 | + |
| 238 | +### 开发环境 |
| 239 | +- Python 3.8+ |
| 240 | +- Node.js 14+ |
| 241 | +- Vue 3 |
| 242 | +- FastAPI |
| 243 | + |
| 244 | +### 本地开发 |
| 245 | +1. 后端开发 |
| 246 | +```bash |
| 247 | +python main.py |
| 248 | +``` |
| 249 | + |
| 250 | +2. 前端开发 |
| 251 | +```bash |
| 252 | +cd fcb-fronted |
| 253 | +npm install |
| 254 | +npm run dev |
| 255 | +``` |
| 256 | + |
| 257 | +## 🤝 贡献指南 |
| 258 | + |
| 259 | +1. Fork 本项目 |
| 260 | +2. 创建新分支 `git checkout -b feature/xxx` |
| 261 | +3. 提交更改 `git commit -m 'Add xxx'` |
| 262 | +4. 推送到分支 `git push origin feature/xxx` |
| 263 | +5. 提交 Pull Request |
| 264 | + |
| 265 | +## ❓ 常见问题 |
| 266 | + |
| 267 | +### Q: 如何修改上传大小限制? |
| 268 | +A: 在管理面板中修改配置项 `uploadSize` |
| 269 | + |
| 270 | +### Q: 如何配置存储引擎? |
| 271 | +A: 在管理面板中选择存储引擎并配置相应参数 |
| 272 | + |
| 273 | +### Q: 如何备份数据? |
| 274 | +A: 备份 `data` 目录即可 |
| 275 | + |
| 276 | +更多问题请访问 [Wiki](https://github.com/vastsa/FileCodeBox/wiki/常见问题) |
| 277 | + |
| 278 | +## 📊 项目统计 |
| 279 | + |
| 280 | +<div align="center"> |
| 281 | +<a href="https://hellogithub.com/repository/75ad7ffedd404a6485b4d621ec5b47e6" target="_blank"><img src="https://api.hellogithub.com/v1/widgets/recommend.svg?rid=75ad7ffedd404a6485b4d621ec5b47e6&claim_uid=beSz6INEkCM4mDH" alt="Featured|HelloGitHub" style="width: 200px; height: 45px;" width="200" height="45" /></a> |
| 282 | + |
| 283 | + |
| 284 | + |
| 285 | +[](https://star-history.com/#vastsa/FileCodeBox&Date) |
| 286 | +</div> |
89 | 287 |
|
90 |
| -## 免责声明 |
| 288 | +## 📜 免责声明 |
91 | 289 |
|
92 |
| -本项目开源仅供学习使用,不得用于任何违法用途,否则后果自负,与本人无关。使用请保留项目地址,谢谢。 |
| 290 | +本项目开源仅供学习使用,不得用于任何违法用途,否则后果自负,与作者无关。使用时请保留项目地址和版权信息。 |
0 commit comments