File tree Expand file tree Collapse file tree 1 file changed +0
-21
lines changed
Expand file tree Collapse file tree 1 file changed +0
-21
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ import (
1111 "fmt"
1212 "io"
1313 "log/slog"
14- "net/http"
1514 "net/url"
1615 "path"
1716 "path/filepath"
@@ -1558,26 +1557,6 @@ func (c *repoComponentImpl) FileInfo(ctx context.Context, req *types.GetFileReq)
15581557 return file , nil
15591558}
15601559
1561- func (c * repoComponentImpl ) getFilePreviewCode (fileContent []byte ) types.FilePreviewCode {
1562- // detect the file content type like text/plain, image/jpeg, etc
1563- detectedType := http .DetectContentType (fileContent )
1564- switch {
1565- case strings .HasPrefix (detectedType , "text" ):
1566- return types .FilePreviewCodeNormal
1567- default :
1568- return types .FilePreviewCodeNotText
1569- }
1570- }
1571-
1572- func (c * repoComponentImpl ) adjustMaxFileSize (maxFileSize int64 ) int64 {
1573- // same with aliyun green check large content size
1574- const maxModerationContentSize = 100 * 9000
1575- if maxFileSize == 0 || maxFileSize > maxModerationContentSize {
1576- maxFileSize = maxModerationContentSize
1577- }
1578- return maxFileSize
1579- }
1580-
15811560func getTagScopeByRepoType (repoType types.RepositoryType ) types.TagScope {
15821561 switch repoType {
15831562 case types .ModelRepo :
You can’t perform that action at this time.
0 commit comments