Broken image for preview of assets uploaded via Web IDE

Summary

Uploading an image in the Web IDE works, but the asset can't be previewed. This prevents someone from verifying the correct asset was uploaded.

Steps to reproduce

  1. Open the Web IDE on any branch
  2. Upload an image to a directory
  3. Web IDE opens a tab to preview that image
  4. Notice the broken thumbnail icon instead of the image preview

Example Project

What is the current bug behavior?

The asset is uploaded correctly to the project but the Web IDE can't preview it until after it has been pushed to the branch.

What is the expected correct behavior?

Assets uploaded via the Web IDE can be previewed in the Web IDE before committing the changes.

Relevant logs and/or screenshots

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes