我在 gin 中有一個接收字節數組的服務器端點。func UploadImageHandler(c *gin.Context) { body, err := c.GetRawData() // how do I make sure this body byte array is image?}我需要確保字節數組是圖像。我如何才能在 Go 中進行此檢查?
檢查字節數組是否為圖像
慕碼人8056858
2022-07-18 10:03:15