初始化

This commit is contained in:
Ran
2026-08-25 17:59:42 +08:00
commit 4b7380dd9b
408 changed files with 327400 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
// Package storage 验证腾讯云 COS 对象键扩展名处理规则。
package storage
import "testing"
// TestKeyWithContentTypeMatchesActualMedia 验证远端媒体类型会覆盖错误扩展名。
func TestKeyWithContentTypeMatchesActualMedia(t *testing.T) {
if got := keyWithContentType("folder/result.png", "image/webp"); got != "folder/result.webp" {
t.Fatalf("got %s", got)
}
if got := keyWithContentType("folder/result.mp4", "video/quicktime"); got != "folder/result.mov" {
t.Fatalf("got %s", got)
}
}