Skip to content

Commit c8215c2

Browse files
committed
check
1 parent 4c3b714 commit c8215c2

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

api/r0/upload_async.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ func UploadMediaAsync(r *http.Request, rctx rcontext.RequestContext, user _apime
5050
mediaId := _routers.GetParam("mediaId", r)
5151
filename := filepath.Base(r.URL.Query().Get("filename"))
5252
// GK-CUSTOMIZATION: Sanitize the filename
53-
if len(filename) > 24 {
54-
return &_responses.ErrorResponse{
55-
Code: common.ErrCodeBadRequest,
56-
Message: "Filename too long.",
57-
InternalCode: common.ErrCodeBadRequest,
58-
}
59-
}
53+
// if len(filename) > 24 {
54+
// return &_responses.ErrorResponse{
55+
// Code: common.ErrCodeBadRequest,
56+
// Message: "Filename too long.",
57+
// InternalCode: common.ErrCodeBadRequest,
58+
// }
59+
// }
6060

6161
// GK-CUSTOMIZATION: Check if the file type is supported
6262
buf, _ := io.ReadAll(r.Body)

api/r0/upload_sync.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ type MediaUploadedResponse struct {
2626
func UploadMediaSync(r *http.Request, rctx rcontext.RequestContext, user _apimeta.UserInfo) interface{} {
2727
filename := filepath.Base(r.URL.Query().Get("filename"))
2828
// GK-CUSTOMIZATION: Sanitize the filename
29-
if len(filename) > 24 {
30-
return &_responses.ErrorResponse{
31-
Code: common.ErrCodeBadRequest,
32-
Message: "Filename too long.",
33-
InternalCode: common.ErrCodeBadRequest,
34-
}
35-
}
29+
// if len(filename) > 24 {
30+
// return &_responses.ErrorResponse{
31+
// Code: common.ErrCodeBadRequest,
32+
// Message: "Filename too long.",
33+
// InternalCode: common.ErrCodeBadRequest,
34+
// }
35+
// }
3636

3737
// GK-CUSTOMIZATION: Check if the file type is supported
3838
buf, _ := io.ReadAll(r.Body)

0 commit comments

Comments
 (0)