Skip to content

Commit

Permalink
question(page): fix file md5
Browse files Browse the repository at this point in the history
  • Loading branch information
wuhan005 committed Dec 12, 2023
1 parent 40b60be commit a558e7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion route/question/page.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,6 @@ func uploadImage(ctx context.Context, opts uploadImageOptions) error {

hasher := md5.New()
reader := io.TeeReader(uploadImageFile, hasher)
fileMd5 := fmt.Sprintf("%x", hasher.Sum(nil))

backupImageBuffer := bytes.Buffer{}
uploadReader := io.TeeReader(reader, &backupImageBuffer)
Expand All @@ -280,6 +279,7 @@ func uploadImage(ctx context.Context, opts uploadImageOptions) error {
publicURLs := map[string]string{
shareServerName: publicURL,
}
fileMd5 := fmt.Sprintf("%x", hasher.Sum(nil))

// Backup file.
go func() {
Expand Down

0 comments on commit a558e7c

Please sign in to comment.