refactor(knowledge): remove unnecessary URL resolution for image paths
This commit is contained in:
@@ -7578,12 +7578,6 @@ func (s *knowledgeService) ProcessDocument(ctx context.Context, t *asynq.Task) e
|
|||||||
// Step 2: Store images and update markdown references
|
// Step 2: Store images and update markdown references
|
||||||
var storedImages []docparser.StoredImage
|
var storedImages []docparser.StoredImage
|
||||||
|
|
||||||
// For URL imports, resolve relative image paths to absolute URLs
|
|
||||||
// so that ResolveRemoteImages can download them.
|
|
||||||
if payload.URL != "" && convertResult != nil {
|
|
||||||
convertResult.MarkdownContent = docparser.ResolveRelativeImageURLs(convertResult.MarkdownContent, payload.URL)
|
|
||||||
}
|
|
||||||
|
|
||||||
if s.imageResolver != nil && convertResult != nil {
|
if s.imageResolver != nil && convertResult != nil {
|
||||||
fileSvc := s.resolveFileService(ctx, kb)
|
fileSvc := s.resolveFileService(ctx, kb)
|
||||||
tenantID, _ := ctx.Value(types.TenantIDContextKey).(uint64)
|
tenantID, _ := ctx.Value(types.TenantIDContextKey).(uint64)
|
||||||
|
|||||||
Reference in New Issue
Block a user