Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Merge requests
  • !7982

Merged
Created Oct 07, 2014 by Administrator@rootOwner

Fix and improve help rendering

  • Overview 30
  • Commits 1
  • Changes 8

Created by: soullivaneuh

In latest versions of Gitlab, image rendering on wiki is broken because not public and not handled by controllers.

Referred issues:

  • #6758 (closed)
  • #7539 (closed)
  • #7610 (closed)

I simplified help controller in order to handle each .md and .other files.

In a nutshell:

  • Add .md file on mime_types initializers to recognize as html
  • Change help_show route to be more generic (subpath in all level possible)
  • New controller logic:
    • Get the requested filepath (without extension) and the format
    • If md format, call render_doc (Same logic as the old one).
    • if another format (all), call send_file_data which test if file exists and just send the content with inline attachment.

With this system, all another file (jpg, png, svg, what else ?) can be handled by help controller and image are no more broken.

I think send_file response can be improved (cache or another header), do you have some suggestions about it ?

Thanks.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: github/fork/soullivaneuh/help-images