Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to preview files unless they have an extension #3281

Closed
DasDunkel opened this issue Apr 2, 2024 · 4 comments
Closed

Unable to preview files unless they have an extension #3281

DasDunkel opened this issue Apr 2, 2024 · 4 comments

Comments

@DasDunkel
Copy link

Expected Behavior

All images with the correct Content-Type metadata value should be able to be previewed based on #2930

Current Behavior

Only files with the relevant extension can be previewed

I have looked at previous issues such as #3272 but they do not seem to be exactly what I am experiencing, all files are publicly available and there are no errors shown in the browser console.

It may be worth noting that this issue only started after splitting to a separate container for the console in order to host it on a separate machine.

Preview of available options in the UI and the content type value;
With extension: https://dunk.dev/img/GLseYINozK
Without extension: https://dunk.dev/img/bzlFggHLXM

Your Environment

  • MinIO version used (minio --version):
minio version RELEASE.2024-03-30T09-41-56Z (commit-id=cb577835d945dbe47f873be96d25caa5a8a858f8)
Runtime: go1.21.8 linux/amd64
License: GNU AGPLv3 <https://www.gnu.org/licenses/agpl-3.0.html>
Copyright: 2015-2024 MinIO, Inc.
console version 0.30.0 - 58aad859
  • Server setup and configuration:

Server is proxied through Caddy using a basic reverse_proxy which handles the headers automatically, though I have tried manually copying the nginx config to the best of my abilities to no avail

  • Operating System and version (uname -a):

Linux 5.10.0-0.deb10.28-rt-amd64 #1 SMP PREEMPT_RT Debian 5.10.209-2~deb10u1 (2024-02-15) x86_64 GNU/Linux

@harshavardhana
Copy link
Member

It relies on that to avoid Stat() however list() already provides content-type which can be used.

@prakashsvmx
Copy link
Member

prakashsvmx commented Apr 3, 2024

export const contentTypePreview = (contentType: string): AllowedPreviews => {

The object's supported preview is decided based on extension or content type.
Only image, Audio, Video, PDF files are supported for preview.

@DasDunkel
Copy link
Author

The Content-Type is set on all files (image/png), they are images, the preview option is greyed out unless the file extension is present, regardless of what value Content-Type holds, as shown in the screenshots provided.

@DasDunkel
Copy link
Author

Well looks like this isn't going to get any more attention, great.

For anyone else that stumbles across this issue in the future; the only fix I could find is using the console that comes built in to the minio docker image, all images preview correctly regardless of whether they have an extension or not because it actually uses the Content-Type set within the metadata, seemingly unlike the separate version of the console.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants