Skip to content

Commit

Permalink
画像アップロード時のconsole表示をわかりやすくした
Browse files Browse the repository at this point in the history
  • Loading branch information
studiokaiji committed Nov 9, 2023
1 parent 93d3ac9 commit f3d4eaa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hostr/cmd/deploy/media.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ type MediaResult struct {
var uploadedMediaFiles = map[string]string{}

func uploadMediaFiles(filePaths []string, requests []*http.Request) {
fmt.Println("Uploading media files...")

client := &http.Client{}

var uploadedMediaFilesCount = 0
Expand Down Expand Up @@ -139,6 +141,7 @@ func uploadMediaFiles(filePaths []string, requests []*http.Request) {
mutex.Lock() // ロックして排他制御
uploadedMediaFilesCount++ // カウントアップ
uploadedMediaFiles[filePath] = result.Url
fmt.Printf("Uploaded %s", filePath)
mutex.Unlock() // ロック解除
}(filePath, req)
}
Expand Down

0 comments on commit f3d4eaa

Please sign in to comment.