Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

test: use an unregistered extension in MIME sniffing test (#6353)

boojack989aad73caef
diff --git a/server/api/v1/attachment_mime_test.go b/server/api/v1/attachment_mime_test.go
index 58a5abfc4..2a93ff1af 100644
--- a/server/api/v1/attachment_mime_test.go
+++ b/server/api/v1/attachment_mime_test.go
@@ -35,7 +35,7 @@ func TestDetectAttachmentMimeType(t *testing.T) {
},
{
name: "unknown extension falls back to content sniffing",
- filename: "photo.xyz",
+ filename: "photo.memosunknown",
content: []byte{0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a},
want: "image/png",
},