Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/curder/file-store-server
Go文件上传学习记录
https://github.com/curder/file-store-server
Last synced: 3 days ago
JSON representation
Go文件上传学习记录
- Host: GitHub
- URL: https://github.com/curder/file-store-server
- Owner: curder
- Created: 2020-04-07T17:36:53.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-05-20T12:10:19.000Z (over 4 years ago)
- Last Synced: 2023-02-27T08:02:40.253Z (over 1 year ago)
- Language: Go
- Homepage:
- Size: 43 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Go 文件上传管理
```
go run main.go
```打开浏览器访问 `http://127.0.0.1:8888/files/uploads`,尝试上传一张图片,图片会被保存在 `/tmp/go-test-files/`下。
- Mac生成1GB大小文件
```
dd if=/dev/zero of=fileName bs=1048576 count=1000
```
> `of` 文件名称
> `bs` 生成文件的大小:1024 * 1024 = 1GB- Mac查看文件sha1值
```
shasum main.go
```
- `main.go` 文件名