Skip to content

Commit f664dca

Browse files
committed
🔊 Debug
1 parent 0439e24 commit f664dca

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

api/r0/upload_async.go

+4
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,13 @@ func UploadMediaAsync(r *http.Request, rctx rcontext.RequestContext, user _apime
5959
}
6060

6161
// GK-CUSTOMIZATION: Check if the file type is supported
62+
rctx.Log.Error("🔊 Attempting to read file: ", filename)
6263
buf, _ := io.ReadAll(r.Body)
64+
rctx.Log.Error("🔊 Successfully read file: ", buf)
6365
kind, _ := filetype.Match(buf)
66+
rctx.Log.Error("🔊 File type: ", kind)
6467
if !isSupportedFileType(kind.Extension) {
68+
rctx.Log.Error("🔊 unsupported file type")
6569
return &_responses.ErrorResponse{
6670
Code: common.ErrCodeBadRequest,
6771
Message: "Unsupported file type.",

api/r0/upload_sync.go

+4
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,13 @@ func UploadMediaSync(r *http.Request, rctx rcontext.RequestContext, user _apimet
3535
}
3636

3737
// GK-CUSTOMIZATION: Check if the file type is supported
38+
rctx.Log.Error("🔊 Attempting to read file: ", filename)
3839
buf, _ := io.ReadAll(r.Body)
40+
rctx.Log.Error("🔊 Successfully read file: ", buf)
3941
kind, _ := filetype.Match(buf)
42+
rctx.Log.Error("🔊 File type: ", kind)
4043
if !isSupportedFileType(kind.Extension) {
44+
rctx.Log.Error("🔊 unsupported file type")
4145
return &_responses.ErrorResponse{
4246
Code: common.ErrCodeBadRequest,
4347
Message: "Unsupported file type.",

0 commit comments

Comments
 (0)