Files
filecodebox/docs/.vitepress/dist/assets/guide_introduction.md.CebWHzyk.js
T
2025-02-12 14:27:39 +08:00

11 lines
14 KiB
Python
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{_ as i,c as e,o as s,ag as t}from"./chunks/framework.BmLMQRXF.js";const g=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/introduction.md","filePath":"guide/introduction.md","lastUpdated":1739330962000}'),l={name:"guide/introduction.md"};function h(n,a,r,o,d,p){return s(),e("div",null,a[0]||(a[0]=[t(`<div align="center"><img src="https://fastly.jsdelivr.net/gh/vastsa/FileCodeBox@V1.6/static/banners/img_1.png" alt="FileCodeBox Logo"><p><em>匿名口令分享文本和文件像拿快递一样取文件</em></p><p><a href="https://github.com/vastsa/FileCodeBox/stargazers" target="_blank" rel="noreferrer"><img src="https://img.shields.io/github/stars/vastsa/FileCodeBox" alt="GitHub stars"></a><a href="https://github.com/vastsa/FileCodeBox/network" target="_blank" rel="noreferrer"><img src="https://img.shields.io/github/forks/vastsa/FileCodeBox" alt="GitHub forks"></a><a href="https://github.com/vastsa/FileCodeBox/issues" target="_blank" rel="noreferrer"><img src="https://img.shields.io/github/issues/vastsa/FileCodeBox" alt="GitHub issues"></a><a href="https://github.com/vastsa/FileCodeBox/blob/master/LICENSE" target="_blank" rel="noreferrer"><img src="https://img.shields.io/github/license/vastsa/FileCodeBox" alt="GitHub license"></a><a href="https://qm.qq.com/q/PemPzhdEIM" target="_blank" rel="noreferrer"><img src="https://img.shields.io/badge/QQ%20Group-739673698-blue.svg" alt="QQ Group"></a><a href="https://www.python.org" target="_blank" rel="noreferrer"><img src="https://img.shields.io/badge/Python-3.8+-blue.svg" alt="Python Version"></a><a href="https://fastapi.tiangolo.com" target="_blank" rel="noreferrer"><img src="https://img.shields.io/badge/FastAPI-0.68+-green.svg" alt="FastAPI"></a><a href="https://v3.vuejs.org" target="_blank" rel="noreferrer"><img src="https://img.shields.io/badge/Vue.js-3.x-brightgreen.svg" alt="Vue Version"></a></p></div><h2 id="🚀-更新计划" tabindex="-1">🚀 更新计划 <a class="header-anchor" href="#🚀-更新计划" aria-label="Permalink to &quot;🚀 更新计划&quot;"></a></h2><ul><li>[ ] 切片上传同文件秒传断点续传</li><li>[ ] 用户登录重构</li><li>[x] webdav存储</li><li>[x] 存储支持自定义路径</li><li>[x] s3优化不修改昵称为uuid新建目录</li></ul><h2 id="📝-项目简介" tabindex="-1">📝 项目简介 <a class="header-anchor" href="#📝-项目简介" aria-label="Permalink to &quot;📝 项目简介&quot;"></a></h2><p>FileCodeBox 是一个基于 FastAPI + Vue3 开发的轻量级文件分享工具它允许用户通过简单的方式分享文本和文件接收者只需要一个提取码就可以取得文件就像从快递柜取出快递一样简单</p><h2 id="🎯-应用场景" tabindex="-1">🎯 应用场景 <a class="header-anchor" href="#🎯-应用场景" aria-label="Permalink to &quot;🎯 应用场景&quot;"></a></h2><table><tr><td align="center"><h4>📁 临时文件分享</h4> 快速分享单个文件无需注册登录 </td><td align="center"><h4>📝 文本快速分享</h4> 分享代码片段文本内容等 </td><td align="center"><h4>🕶️ 匿名文件传输</h4> 保护隐私的文件传输方式 </td></tr><tr><td align="center"><h4>💾 临时文件存储</h4> 支持设置过期时间的文件存储 </td><td align="center"><h4>🔄 跨平台传输</h4> 在不同设备间快速传输文件 </td><td align="center"><h4>🌐 小型分享服务</h4> 搭建私有的文件分享服务 </td></tr></table><h2 id="✨-核心特性" tabindex="-1"> 核心特性 <a class="header-anchor" href="#✨-核心特性" aria-label="Permalink to &quot;✨ 核心特性&quot;"></a></h2><table><tr><td align="center"><h4>🚀 轻量简洁</h4> 基于 FastAPI + SQLite3 + Vue3 + ElementUI部署简单性能出色 </td><td align="center"><h4>📤 便捷上传</h4> 支持复制粘贴拖拽上传操作简单直观 </td><td align="center"><h4>📦 多种类型</h4> 支持文本和各类文件的分享 </td></tr><tr><td align="center"><h4>🔒 安全机制</h4><ul><li>IP 限制上传次数</li><li>错误次数限制</li><li>文件过期机制</li></ul></td><td align="center"><h4>🎫 提取码分享</h4> 随机提取码可自定义次数及有效期 </td><td align="center"><h4>🌍 多语言支持</h4> 支持中文简体繁体及英文 </td></tr><tr><td align="center"><h4>🎭 匿名分享</h4> 无需注册登录保护隐私 </td><td align="center"><h4>🛠 管理面板</h4> 文件管理和系统配置 </td><td align="center"><h4>🐳 容器部署</h4> 支持 Docker 一键部署 </td></tr><tr><td align="center"><h4>💾 存储扩展</h4> 支持本地存储S3 协议OneDrive </td><td align="center"><h4>📱 响应式设计</h4> 支持移动端访问 </td><td align="center"><h4>💻 终端支持</h4> 支持命令行下载 </td></tr></table><h2 id="🚀-快速开始" tabindex="-1">🚀 快速开始 <a class="header-anchor" href="#🚀-快速开始" aria-label="Permalink to &quot;🚀 快速开始&quot;"></a></h2><h3 id="docker-部署" tabindex="-1">Docker 部署 <a class="header-anchor" href="#docker-部署" aria-label="Permalink to &quot;Docker 部署&quot;"></a></h3><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> run</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -d</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --restart=always</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -p</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 12345:12345</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -v</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /opt/FileCodeBox/:/app/data</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --name</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> filecodebox</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> lanol/filecodebox:beta</span></span></code></pre></div><h3 id="手动部署" tabindex="-1">手动部署 <a class="header-anchor" href="#手动部署" aria-label="Permalink to &quot;手动部署&quot;"></a></h3><ol><li>克隆项目</li></ol><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">git</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> clone</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> https://github.com/vastsa/FileCodeBox.git</span></span></code></pre></div><ol start="2"><li>安装依赖</li></ol><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> FileCodeBox</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">pip</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -r</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> requirements.txt</span></span></code></pre></div><ol start="3"><li>启动服务</li></ol><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">python</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> main.py</span></span></code></pre></div><h2 id="📖-使用说明" tabindex="-1">📖 使用说明 <a class="header-anchor" href="#📖-使用说明" aria-label="Permalink to &quot;📖 使用说明&quot;"></a></h2><h3 id="分享文件" tabindex="-1">分享文件 <a class="header-anchor" href="#分享文件" aria-label="Permalink to &quot;分享文件&quot;"></a></h3><ol><li>打开网页点击&quot;分享文件&quot;</li><li>选择或拖拽文件</li><li>设置过期时间和次数</li><li>获取提取码</li></ol><h3 id="获取文件" tabindex="-1">获取文件 <a class="header-anchor" href="#获取文件" aria-label="Permalink to &quot;获取文件&quot;"></a></h3><ol><li>打开网页输入提取码</li><li>点击获取</li><li>下载文件或查看文本</li></ol><h3 id="管理面板" tabindex="-1">管理面板 <a class="header-anchor" href="#管理面板" aria-label="Permalink to &quot;管理面板&quot;"></a></h3><ol><li>访问 <code>/admin</code></li><li>输入管理员密码</li><li>管理文件和配置</li></ol><h2 id="🛠-开发指南" tabindex="-1">🛠 开发指南 <a class="header-anchor" href="#🛠-开发指南" aria-label="Permalink to &quot;🛠 开发指南&quot;"></a></h2><h3 id="项目结构" tabindex="-1">项目结构 <a class="header-anchor" href="#项目结构" aria-label="Permalink to &quot;项目结构&quot;"></a></h3><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>FileCodeBox/</span></span>
<span class="line"><span>├── apps/ # 应用代码</span></span>
<span class="line"><span> ├── admin/ # 管理后台</span></span>
<span class="line"><span> └── base/ # 基础功能</span></span>
<span class="line"><span>├── core/ # 核心功能</span></span>
<span class="line"><span>├── data/ # 数据目录</span></span>
<span class="line"><span>└── fcb-fronted/ # 前端代码</span></span></code></pre></div><h3 id="开发环境" tabindex="-1">开发环境 <a class="header-anchor" href="#开发环境" aria-label="Permalink to &quot;开发环境&quot;"></a></h3><ul><li>Python 3.8+</li><li>Node.js 14+</li><li>Vue 3</li><li>FastAPI</li></ul><h3 id="本地开发" tabindex="-1">本地开发 <a class="header-anchor" href="#本地开发" aria-label="Permalink to &quot;本地开发&quot;"></a></h3><ol><li>后端开发</li></ol><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">python</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> main.py</span></span></code></pre></div><ol start="2"><li>前端开发</li></ol><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> fcb-fronted</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">npm</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">npm</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> run</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> dev</span></span></code></pre></div><h2 id="🤝-贡献指南" tabindex="-1">🤝 贡献指南 <a class="header-anchor" href="#🤝-贡献指南" aria-label="Permalink to &quot;🤝 贡献指南&quot;"></a></h2><ol><li>Fork 本项目</li><li>创建新分支 <code>git checkout -b feature/xxx</code></li><li>提交更改 <code>git commit -m &#39;Add xxx&#39;</code></li><li>推送到分支 <code>git push origin feature/xxx</code></li><li>提交 Pull Request</li></ol><h2 id="❓-常见问题" tabindex="-1">❓ 常见问题 <a class="header-anchor" href="#❓-常见问题" aria-label="Permalink to &quot;❓ 常见问题&quot;"></a></h2><h3 id="q-如何修改上传大小限制" tabindex="-1">Q: 如何修改上传大小限制? <a class="header-anchor" href="#q-如何修改上传大小限制" aria-label="Permalink to &quot;Q: 如何修改上传大小限制?&quot;"></a></h3><p>A: 在管理面板中修改配置项 <code>uploadSize</code></p><h3 id="q-如何配置存储引擎" tabindex="-1">Q: 如何配置存储引擎? <a class="header-anchor" href="#q-如何配置存储引擎" aria-label="Permalink to &quot;Q: 如何配置存储引擎?&quot;"></a></h3><p>A: 在管理面板中选择存储引擎并配置相应参数</p><h3 id="q-如何备份数据" tabindex="-1">Q: 如何备份数据? <a class="header-anchor" href="#q-如何备份数据" aria-label="Permalink to &quot;Q: 如何备份数据?&quot;"></a></h3><p>A: 备份 <code>data</code> 目录即可</p><p>更多问题请访问 <a href="https://github.com/vastsa/FileCodeBox/wiki/%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98" target="_blank" rel="noreferrer">Wiki</a></p><h2 id="📊-项目统计" tabindex="-1">📊 项目统计 <a class="header-anchor" href="#📊-项目统计" aria-label="Permalink to &quot;📊 项目统计&quot;"></a></h2><div align="center"><a href="https://hellogithub.com/repository/75ad7ffedd404a6485b4d621ec5b47e6" target="_blank"><img src="https://api.hellogithub.com/v1/widgets/recommend.svg?rid=75ad7ffedd404a6485b4d621ec5b47e6&amp;claim_uid=beSz6INEkCM4mDH" alt="FeaturedHelloGitHub" style="width:200px;height:45px;" width="200" height="45"></a><p><img src="https://repobeats.axiom.co/api/embed/7a6c92f1d96ee57e6fb67f0df371528397b0c9ac.svg" alt="Repobeats"></p><p><a href="https://star-history.com/#vastsa/FileCodeBox&amp;Date" target="_blank" rel="noreferrer"><img src="https://api.star-history.com/svg?repos=vastsa/FileCodeBox&amp;type=Date" alt="Star History"></a></p></div><h2 id="📜-免责声明" tabindex="-1">📜 免责声明 <a class="header-anchor" href="#📜-免责声明" aria-label="Permalink to &quot;📜 免责声明&quot;"></a></h2><p>本项目开源仅供学习使用,不得用于任何违法用途,否则后果自负,与作者无关。使用时请保留项目地址和版权信息。</p>`,50)]))}const k=i(l,[["render",h]]);export{g as __pageData,k as default};