{"id":41996698,"url":"https://github.com/yddeng/filecloud","last_synced_at":"2026-01-26T01:06:05.422Z","repository":{"id":37670752,"uuid":"314457766","full_name":"yddeng/filecloud","owner":"yddeng","description":"仿百度网盘，个人云盘。 file cloud","archived":false,"fork":false,"pushed_at":"2022-06-10T08:44:24.000Z","size":13417,"stargazers_count":196,"open_issues_count":4,"forks_count":41,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-06-20T06:25:33.662Z","etag":null,"topics":["baidu","file","filecloud","pan"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yddeng.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-20T05:41:39.000Z","updated_at":"2024-06-01T12:46:47.000Z","dependencies_parsed_at":"2022-07-08T07:41:56.681Z","dependency_job_id":null,"html_url":"https://github.com/yddeng/filecloud","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/yddeng/filecloud","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yddeng%2Ffilecloud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yddeng%2Ffilecloud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yddeng%2Ffilecloud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yddeng%2Ffilecloud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yddeng","download_url":"https://codeload.github.com/yddeng/filecloud/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yddeng%2Ffilecloud/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28763132,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T00:37:26.264Z","status":"ssl_error","status_checked_at":"2026-01-26T00:37:25.959Z","response_time":113,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["baidu","file","filecloud","pan"],"created_at":"2026-01-26T01:06:04.852Z","updated_at":"2026-01-26T01:06:05.395Z","avatar_url":"https://github.com/yddeng.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fileCloud\n\n仿百度网盘，实现个人文件存储云盘。\n\n## 功能支持\n\n- 账号登陆、验证\n- 文件上传。 支持单文件、多文件、文件夹上传\n- 文件、文件夹拷贝、移动\n- 文件下载\n- 分享链接 \n- 在线预览 todo\n\n\n## 页面展示\n\n文件上传\n![文件上传](assets/upload.png)\n文件移动、拷贝\n![文件移动](assets/move.png)\n分享\n![文件分享](assets/shared.png)\n已分享列表\n![分享列表](assets/shared_list.png)\n\n\n## 分片上传、断点续传\n\n文件过大时，上传文件需要很长时间，且中途退出将导致文件重传。\n\n分片上传: 上传文件时，在本地将文件按照 4M 的大小将文件进行分片。在服务器端将文件组合。\n\n断点续传: 如果文件没有上传完，关闭客户端。再一次上传文件时，对比服务器已经上传的分片，只需要上传没有的分片。\n\n程序重启时，由于不保存目录结构和上传进度。会删除已经上传的文件分片，再次上传从头开始。\n\n## 秒传\n\n每一个文件都有对应的md5码。当检测上传文件时，如果本地已经存在相同md5的文件，则不需要用户上传。\n\n## 链接分享\n\n选择同一路径下多个文件、文件夹进行分享。后端生成一条访问链接及提取码。类似百度网盘\n\n`链接: http://127.0.0.1:9987/shared/s/ODWA8WRPH9ZfWLea  提取码: EsRr`\n\n说明： 后端仅缓存分享的路径及选择的文件，不做源文件的移动拷贝等。存在分享后又移除了分享的文件，\n用户能正常访问链接，但不会展示该文件。\n\n## 文件保存方案\n\nSaveFileMultiple 文件是否保存为多份。\n\n已经存在md5文件时\n- 当 SaveFileMultiple=false，仅添加文件指向，当前文件夹下不存在该文件，即整个云盘只存在一份源文件。\n删除时，判读文件引用，当引用为0时执行文件的删除;若删除源文件且还有文件引用，将文件移动到引用处。\n- 当 SaveFileMultiple=true，会将源文件拷贝一份到当前目录。整个云盘存在多份文件，磁盘占用为N倍。删除时，直接删除当前文件。\n\n由于不设计目录结构的保存，故 SaveFileMultiple=false时，程序重启会恢复到真实目录文件结构。\n\n## 不做目录结构和文件上传分片保存说明\n\n目录结构，文件上传分片保存在内存中。程序重启后会丢失信息。\n\n若目录文件存在手动修改，保存信息后重启将导致文件数据不匹配，保不保存意义不大。\n\n若目录文件不存在手动修改，仅有 SaveFileMultiple=false 时,重启时需要还原到停机状态才需要保存信息。\n而 SaveFileMultiple=true，重启加载目录与停机时一致，不需要保存信息。\n\n故重启目录结构显示是真实的目录结构。上传的文件分片会在重启加载时删除。\n\n\n## 启动\n\n前端： vue4.5.15 + [antd.1x](https://1x.antdv.com/docs/vue/introduce-cn/)\n\n后端： go1.17.7 + [gin](https://github.com/gin-gonic/gin)\n\n### 前端项目\n\n`已经在 dist 中打包了前端项目，只需要更改 dist/config.js 中 baseUrl 即可(与后端webAddr 一致)`\n\n以下是编译打包流程\n\n切换到 `front-vue` 目录\n\n安装依赖 `yarn install `\n\n更改 `src/public/config.js` 第2行 `baseUrl : 'http://127.0.0.1:9987'` 地址 \n\n运行 `yarn run serve `\n\n打包 `yarn build` , 运行后会在`front-vue`目录生成 `dist` 文件夹，里面就是构建打包好的文件\n\n\n### 后端项目\n\n切换到 `back-go/cmd` 目录\n\n配置 `config.toml`\n```\n  WebAddr   = \"127.0.0.1:9987\"            # web 地址\n  WebIndex  = \"../../front-vue/dist\"      # web html目录\n  FilePath  = \"cloud\"                     # 文件存放目录\n  SaveFileMultiple = true                 # 文件是否保存为多份\n  FileDiskTotal    = 50                   # 配置的网盘容量，单位 M\n```\n\n启动 `go run filecloud.go` 或者 `go build filecloud.go`+`./filecloud`\n\n\n3. 浏览器访问 `127.0.0.1:9987` 。用 `http` 方式访问。\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyddeng%2Ffilecloud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyddeng%2Ffilecloud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyddeng%2Ffilecloud/lists"}