mirror of
https://github.com/studiokaiji/nostr-webhost.git
synced 2026-02-22 15:34:48 +01:00
Merge pull request #54 from studiokaiji/fix-secure-mode-url
Fix secure mode url
This commit is contained in:
@@ -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
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ func main() {
|
||||
}
|
||||
|
||||
defaultModeUrl := "https://h.hostr.cc"
|
||||
secureModeUrl := fmt.Sprintf("https://%s.h.hostr.cc", npub)
|
||||
secureModeUrl := fmt.Sprintf("https://%s.hostr.cc", npub)
|
||||
|
||||
if replaceable {
|
||||
defaultModeUrl = fmt.Sprintf("%s/p/%s/d/%s", defaultModeUrl, npub, dTag)
|
||||
|
||||
Reference in New Issue
Block a user