-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
28 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
// SPDX-FileCopyrightText: 2015-2024 caixw | ||
// | ||
// SPDX-License-Identifier: MIT | ||
|
||
// Package upload 提供文件上传的功能 | ||
// | ||
// 处理上传文件,若是图片还可以设置水印。 | ||
// func(w http.ResponseWriter, r *http.Request) { | ||
// u, err := upload.New("~/uploads/", 1024*1024*10, ".txt", ".jpg", ".png") | ||
// u.SetWatermarkFile(...) // 可根据需要设置水印图片 | ||
// | ||
// if r.Method="POST"{ | ||
// u.Do("files", r) // 执行上传操作 | ||
// } | ||
// } | ||
// | ||
// func(w http.ResponseWriter, r *http.Request) { | ||
// u, err := upload.New("~/uploads/", 1024*1024*10, ".txt", ".jpg", ".png") | ||
// u.SetWatermarkFile(...) // 可根据需要设置水印图片 | ||
// | ||
// if r.Method="POST"{ | ||
// u.Do("files", r) // 执行上传操作 | ||
// } | ||
// } | ||
package upload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
module github.com/issue9/upload/v2 | ||
|
||
require ( | ||
github.com/issue9/assert/v3 v3.0.4 | ||
github.com/issue9/watermark v1.2.2 | ||
github.com/issue9/assert/v4 v4.1.1 | ||
github.com/issue9/watermark v1.2.3 | ||
) | ||
|
||
go 1.17 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
github.com/issue9/assert/v3 v3.0.0/go.mod h1:yft/uaskRpwQTyBT3n1zRl91SR1wNlO4fLZHzOa4bdM= | ||
github.com/issue9/assert/v3 v3.0.4 h1:WsYZQ6PQmM/pGFrbkn5GIXjWeVZHv+wcl2829UTX1Qc= | ||
github.com/issue9/assert/v3 v3.0.4/go.mod h1:yft/uaskRpwQTyBT3n1zRl91SR1wNlO4fLZHzOa4bdM= | ||
github.com/issue9/watermark v1.2.2 h1:NZKq4hgnvlJAkZBsN4ukD4/CM+PXV1auQejng1tfuZM= | ||
github.com/issue9/watermark v1.2.2/go.mod h1:KMwBYtBwNnMWCNn+jLpOQTV5B8cT73FzzD/lsXKwyf0= | ||
github.com/issue9/assert/v4 v4.1.1 h1:OhPE8SB8n/qZCNGLQa+6MQtr/B3oON0JAVj68k8jJlc= | ||
github.com/issue9/assert/v4 v4.1.1/go.mod h1:v7qDRXi7AsaZZNh8eAK2rkLJg5/clztqQGA1DRv9Lv4= | ||
github.com/issue9/watermark v1.2.3 h1:U+W3kvtElxrB++1FHqNlALEClnXIiJyheGARe5r7O3Q= | ||
github.com/issue9/watermark v1.2.3/go.mod h1:QtlFopr7R0o+Tnc4Vzrn3AFhJX9jqsKbNr2HTsP3PWU= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
// SPDX-FileCopyrightText: 2015-2024 caixw | ||
// | ||
// SPDX-License-Identifier: MIT | ||
|
||
package upload | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters