Skip to content

Problem with File Path Format in FileManagerBundle when Integrating with fos_ckeditor in easyadmin 3 #147

@ethsam

Description

@ethsam

Issue Description

I am encountering an issue with FileManagerBundle where the file path returned after uploading an image includes unnecessary query parameters and formatting that complicates its use within CKEditor. The path returned is as follows:

/manager/file/mypicture.jpeg?conf=images&module=ckeditor&CKEditor=Item_content&CKEditorFuncNum=3&langCode=fr

Steps to Reproduce

  1. Go to the CKEditor instance integrated with FileManager.
  2. Upload an image using FileManager.
  3. Select the image to insert it into CKEditor.

Expected Behavior

The expected behavior is that the file path should be clean and usable directly within CKEditor, ideally formatted as:

/uploads/images/mypicture.jpeg

Actual Behavior

The actual file path returned includes query parameters and URL encoding that are not necessary for the use within CKEditor, making it less clean and potentially problematic for routing:

/manager/file/mypicture.jpeg?conf=images&module=ckeditor&CKEditor=Item_content&CKEditorFuncNum=3&langCode=fr

Suggested Fix or Enhancement

A potential fix would be to adjust the FileManagerBundle's integration with CKEditor to strip unnecessary URL parameters and possibly provide a cleaner, more direct path format. This might involve configuring how FileManager handles file path returns or modifying how CKEditor receives and processes these paths.

Additional Information

This issue impacts usability and could affect other integrations where clean paths are necessary. A solution would help ensure FileManagerBundle works seamlessly with CKEditor and other similar applications.

Thank you for looking into this matter. I am looking forward to your suggestions or fixes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions