package
module
Version:
v0.0.0-...-a7ae2ba
Opens a new window with list of versions in this module.
Published: May 6, 2020
License: MIT
Opens a new window with license information.
Imports: 14
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
使用goroutine的多图片上传包
实现的功能
- 多图片上传
- 限制图片大小
- 限制图片数量
- 限制上传图片类型
- 按日期切割图片
- 使用协程并发操作图片
- 超时机制
运行
go get -v github.com/lujiahaoo/gin-upload
配置
假设项目目录结构如下(缩略了一些)
project/
├── config
│ ├── app.yml
│ └── refreshtoken.txt
├── go.mod
├── go.sum
├── main.go
├── static
│ ├── 2020-04-12
│ │ ├── 7wyabtlgzs.jpg
│ │ ├── n514brfa9d.jpg
│ │ └── xlfs4ldl5z.jpg
│ └── thumbnail
│ └── 7wyabtlgzs.jpg
其中存放图片的static
目录可以按自己需要更改
Documentation
¶
func GenRandomString(length int) []byte
Source Files
¶
Click to show internal directories.
Click to hide internal directories.