fix(go): correct file uploading error processing. Fix Bug 73601

This commit is contained in:
sshakndr
2025-03-20 15:12:20 +07:00
parent 649e167916
commit 5ca511d838

View File

@ -44,7 +44,7 @@ func (srv *DefaultServerEndpointsHandler) Upload(w http.ResponseWriter, r *http.
srv.logger.Debug("A new upload call")
if !srv.DocumentManager.IsDocumentConvertable(handler.Filename) {
srv.logger.Errorf("File %s is not supported", handler.Filename)
shared.SendCustomErrorResponse(w, "File type is not supported")
shared.SendResponse(w, map[string]string{"error": "File type is not supported"})
return
}