Skip to content

Beats0/gofileupload

Repository files navigation

gofileupload

一个用 vue + go 写的网盘服务器

线上体验

demo

go file upload.png

*Tip: 双击文件图标可查看文件详情

前端

  • node >= 10
  • vue-cli 3
  • vuetify

后端

  • go >= 1.13.1
  • mysql, Gorm
  • go-gin

TODO:

  • 多用户使用
  • 单个,多个文件上传
  • 大文件分片、断点续传
  • 文件MD5检验
  • restful api
  • token认证
  • 文件分类
  • 文件搜索
  • 文件预览
  • 文件下载
  • 文件命名
  • 视频播放
  • 图片缩略图
  • 文件合成下载
  • 优化上传进度控制面板
  • 文件复制、移动
  • 上传文件夹
  • 文件分享
  • 回收站

使用

前端

cd client/gofileupload

### install
yarn install

### dev
yarn run serve

### build
yarn run build

默认访问

http://localhost:8080

后端

cd

### install
go get -u

### 创建static下assets和upload文件夹
mkdir -p static/assets static/upload

### run debug
go run main.go -mode debug

### build
go build main.go

### run release
go run main.go -mode release

默认访问

http://localhost:8081

部署

前端vue打包后

client\gofileupload\dist内所有文件放在 static\assets

client\gofileupload\dist\index.html复制到 templates\index.html

后端添加 conf\app_release.ini 配置文件, 内容为自己的服务器部署配置信息

后端打包后,执行go run main.go -mode release

配置详见 config