From: 2weiEmu Date: Tue, 2 Jun 2026 17:51:15 +0000 (+0200) Subject: updated: to not use json.stringify, just so it all works and is easier X-Git-Url: https://git.saalbach.dev/?a=commitdiff_plain;h=aac4a740ecbee9fda0716c8f246b9e11b768cfea;p=binbsis50-sm.git updated: to not use json.stringify, just so it all works and is easier --- diff --git a/pkg/dbhandling/filesapi.go b/pkg/dbhandling/filesapi.go index 20b62e6..869b9f7 100644 --- a/pkg/dbhandling/filesapi.go +++ b/pkg/dbhandling/filesapi.go @@ -59,6 +59,7 @@ func (dbw *DBWrapper) FilesCreateWithURL(w http.ResponseWriter, r *http.Request) resp, err := http.Get(url) if (err != nil) || (resp.Status != "200 OK") { + _ = os.Remove(dbw.PathToSongs + "/" + filename) fmt.Println("Error", err) w.WriteHeader(http.StatusNotFound) return diff --git a/public/js/index.js b/public/js/index.js index cf128b6..62028c5 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -371,7 +371,7 @@ async function uploadFileWithLinkAndName() { let response = await fetch("/api/files/createWithURL/" + name, { method: "POST", - body: JSON.stringify(link) + body: link }) if (response.status != 200) { diff --git a/songmanager b/songmanager index c1f2926..5f55f20 100755 Binary files a/songmanager and b/songmanager differ diff --git a/testing/songs/elastic_heart b/testing/songs/elastic_heart deleted file mode 100644 index e69de29..0000000 diff --git a/testing/songs/elastic_heart.m4a b/testing/songs/elastic_heart.m4a index e69de29..2cdcb4b 100644 Binary files a/testing/songs/elastic_heart.m4a and b/testing/songs/elastic_heart.m4a differ diff --git a/testing/songs/elastic_heart_sia b/testing/songs/elastic_heart_sia deleted file mode 100644 index e69de29..0000000