2 |
3 |

4 |
5 |
Share text and files anonymously with a passcode, like picking up a package
6 |
7 | [](https://github.com/vastsa/FileCodeBox/stargazers)
8 | [](https://github.com/vastsa/FileCodeBox/network)
9 | [](https://github.com/vastsa/FileCodeBox/issues)
10 | [](https://github.com/vastsa/FileCodeBox/blob/master/LICENSE)
11 | [](https://qm.qq.com/q/PemPzhdEIM)
12 | [](https://www.python.org)
13 | [](https://fastapi.tiangolo.com)
14 | [](https://v3.vuejs.org)
15 |
16 |
17 |
18 | ## 📝 Introduction
19 |
20 | FileCodeBox is a lightweight file sharing tool developed with FastAPI + Vue3. It allows users to share text and files easily, where recipients only need a passcode to retrieve the files, just like picking up a package from a delivery locker.
21 |
22 | ## 🖼️ Preview
23 |
24 |
73 |
74 |
75 | 🚀 Lightweight
76 | Based on FastAPI + SQLite3 + Vue3 + ElementUI
77 | |
78 |
79 | 📤 Easy Upload
80 | Support copy-paste and drag-drop
81 | |
82 |
83 | 📦 Multiple Types
84 | Support text and various file types
85 | |
86 |
87 |
88 |
89 | 🔒 Security
90 |
91 | - IP upload limits
92 | - Error attempt limits
93 | - File expiration
94 | |
95 |
96 | 🎫 Passcode Sharing
97 | Random codes with customizable limits
98 | |
99 |
100 | 🌍 Multi-language
101 | Support for Simplified Chinese, Traditional Chinese, and English
102 | |
103 |
104 |
105 |
106 | 🎭 Anonymous
107 | No registration required
108 | |
109 |
110 | 🛠 Admin Panel
111 | File and system management
112 | |
113 |
114 | 🐳 Docker
115 | One-click deployment
116 | |
117 |
118 |
119 |
120 | 💾 Storage Options
121 | Local, S3, OneDrive support
122 | |
123 |
124 | 📱 Responsive
125 | Mobile-friendly design
126 | |
127 |
128 | 💻 CLI Support
129 | Command-line download
130 | |
131 |
132 |
133 |
134 | ## 🚀 Quick Start
135 |
136 | ### Docker Deployment
137 |
138 | ```bash
139 | docker run -d --restart=always -p 12345:12345 -v /opt/FileCodeBox/:/app/data --name filecodebox lanol/filecodebox:beta
140 | ```
141 |
142 | ### Manual Deployment
143 |
144 | 1. Clone the repository
145 | ```bash
146 | git clone https://github.com/vastsa/FileCodeBox.git
147 | ```
148 |
149 | 2. Install dependencies
150 | ```bash
151 | cd FileCodeBox
152 | pip install -r requirements.txt
153 | ```
154 |
155 | 3. Start the service
156 | ```bash
157 | python main.py
158 | ```
159 |
160 | ## 📖 Usage Guide
161 |
162 | ### Share Files
163 | 1. Open the website, click "Share File"
164 | 2. Select or drag files
165 | 3. Set expiration time and count
166 | 4. Get the passcode
167 |
168 | ### Retrieve Files
169 | 1. Open the website, enter passcode
170 | 2. Click retrieve
171 | 3. Download file or view text
172 |
173 | ### Admin Panel
174 | 1. Visit `/admin`
175 | 2. Enter admin password
176 | 3. Manage files and settings
177 |
178 | ## 🛠 Development Guide
179 |
180 | ### Project Structure
181 | ```
182 | FileCodeBox/
183 | ├── apps/ # Application code
184 | │ ├── admin/ # Admin backend
185 | │ └── base/ # Base functions
186 | ├── core/ # Core functions
187 | ├── data/ # Data directory
188 | └── fcb-fronted/ # Frontend code
189 | ```
190 |
191 | ### Development Environment
192 | - Python 3.8+
193 | - Node.js 14+
194 | - Vue 3
195 | - FastAPI
196 |
197 | ### Local Development
198 | 1. Backend development
199 | ```bash
200 | python main.py
201 | ```
202 |
203 | 2. Frontend development
204 | ```bash
205 | cd fcb-fronted
206 | npm install
207 | npm run dev
208 | ```
209 |
210 | ## 🤝 Contributing
211 |
212 | 1. Fork the project
213 | 2. Create your feature branch `git checkout -b feature/xxx`
214 | 3. Commit your changes `git commit -m 'Add xxx'`
215 | 4. Push to the branch `git push origin feature/xxx`
216 | 5. Open a Pull Request
217 |
218 | ## ❓ FAQ
219 |
220 | ### Q: How to modify upload size limit?
221 | A: Change `uploadSize` in admin panel
222 |
223 | ### Q: How to configure storage engine?
224 | A: Select storage engine and configure parameters in admin panel
225 |
226 | ### Q: How to backup data?
227 | A: Backup the `data` directory
228 |
229 | For more questions, visit [Wiki](https://github.com/vastsa/FileCodeBox/wiki/常见问题)
230 |
231 | ## 😀 Project Statistics and Analytics
232 |
233 |
2 |
3 |

4 |
5 |
匿名口令分享文本和文件,像拿快递一样取文件
6 |
7 | [](https://github.com/vastsa/FileCodeBox/stargazers)
8 | [](https://github.com/vastsa/FileCodeBox/network)
9 | [](https://github.com/vastsa/FileCodeBox/issues)
10 | [](https://github.com/vastsa/FileCodeBox/blob/master/LICENSE)
11 | [](https://qm.qq.com/q/PemPzhdEIM)
12 | [](https://www.python.org)
13 | [](https://fastapi.tiangolo.com)
14 | [](https://v3.vuejs.org)
15 |
16 |
17 |
18 | ## 🚀 更新计划
19 | - [ ] 切片上传,同文件秒传,断点续传
20 | - [ ] 用户登录重构
21 | - [x] webdav存储
22 | - [x] 存储支持自定义路径
23 | - [x] s3优化,不修改昵称为uuid,新建目录
24 |
25 | ## 📝 项目简介
26 |
27 | FileCodeBox 是一个基于 FastAPI + Vue3 开发的轻量级文件分享工具。它允许用户通过简单的方式分享文本和文件,接收者只需要一个提取码就可以取得文件,就像从快递柜取出快递一样简单。
28 |
29 | ## 🎯 应用场景
30 |
31 |
65 |
66 |
67 | 🚀 轻量简洁
68 | 基于 FastAPI + SQLite3 + Vue3 + ElementUI,部署简单,性能出色
69 | |
70 |
71 | 📤 便捷上传
72 | 支持复制粘贴、拖拽上传,操作简单直观
73 | |
74 |
75 | 📦 多种类型
76 | 支持文本和各类文件的分享
77 | |
78 |
79 |
80 |
81 | 🔒 安全机制
82 |
83 | - IP 限制上传次数
84 | - 错误次数限制
85 | - 文件过期机制
86 | |
87 |
88 | 🎫 提取码分享
89 | 随机提取码,可自定义次数及有效期
90 | |
91 |
92 | 🌍 多语言支持
93 | 支持中文简体、繁体及英文
94 | |
95 |
96 |
97 |
98 | 🎭 匿名分享
99 | 无需注册登录,保护隐私
100 | |
101 |
102 | 🛠 管理面板
103 | 文件管理和系统配置
104 | |
105 |
106 | 🐳 容器部署
107 | 支持 Docker 一键部署
108 | |
109 |
110 |
111 |
112 | 💾 存储扩展
113 | 支持本地存储、S3 协议、OneDrive 等
114 | |
115 |
116 | 📱 响应式设计
117 | 支持移动端访问
118 | |
119 |
120 | 💻 终端支持
121 | 支持命令行下载
122 | |
123 |
124 |
125 |
126 | ## 🚀 快速开始
127 |
128 | ### Docker 部署
129 |
130 | ```bash
131 | docker run -d --restart=always -p 12345:12345 -v /opt/FileCodeBox/:/app/data --name filecodebox lanol/filecodebox:beta
132 | ```
133 |
134 | ### 手动部署
135 |
136 | 1. 克隆项目
137 | ```bash
138 | git clone https://github.com/vastsa/FileCodeBox.git
139 | ```
140 |
141 | 2. 安装依赖
142 | ```bash
143 | cd FileCodeBox
144 | pip install -r requirements.txt
145 | ```
146 |
147 | 3. 启动服务
148 | ```bash
149 | python main.py
150 | ```
151 |
152 | ## 📖 使用说明
153 |
154 | ### 分享文件
155 | 1. 打开网页,点击"分享文件"
156 | 2. 选择或拖拽文件
157 | 3. 设置过期时间和次数
158 | 4. 获取提取码
159 |
160 | ### 获取文件
161 | 1. 打开网页,输入提取码
162 | 2. 点击获取
163 | 3. 下载文件或查看文本
164 |
165 | ### 管理面板
166 | 1. 访问 `/admin`
167 | 2. 输入管理员密码
168 | 3. 管理文件和配置
169 |
170 | ## 🛠 开发指南
171 |
172 | ### 项目结构
173 | ```
174 | FileCodeBox/
175 | ├── apps/ # 应用代码
176 | │ ├── admin/ # 管理后台
177 | │ └── base/ # 基础功能
178 | ├── core/ # 核心功能
179 | ├── data/ # 数据目录
180 | └── fcb-fronted/ # 前端代码
181 | ```
182 |
183 | ### 开发环境
184 | - Python 3.8+
185 | - Node.js 14+
186 | - Vue 3
187 | - FastAPI
188 |
189 | ### 本地开发
190 | 1. 后端开发
191 | ```bash
192 | python main.py
193 | ```
194 |
195 | 2. 前端开发
196 | ```bash
197 | cd fcb-fronted
198 | npm install
199 | npm run dev
200 | ```
201 |
202 | ## 🤝 贡献指南
203 |
204 | 1. Fork 本项目
205 | 2. 创建新分支 `git checkout -b feature/xxx`
206 | 3. 提交更改 `git commit -m 'Add xxx'`
207 | 4. 推送到分支 `git push origin feature/xxx`
208 | 5. 提交 Pull Request
209 |
210 | ## ❓ 常见问题
211 |
212 | ### Q: 如何修改上传大小限制?
213 | A: 在管理面板中修改配置项 `uploadSize`
214 |
215 | ### Q: 如何配置存储引擎?
216 | A: 在管理面板中选择存储引擎并配置相应参数
217 |
218 | ### Q: 如何备份数据?
219 | A: 备份 `data` 目录即可
220 |
221 | 更多问题请访问 [Wiki](https://github.com/vastsa/FileCodeBox/wiki/常见问题)
222 |
223 | ## 📊 项目统计
224 |
225 |