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

Pupcloud in docker will not show (in browser) content of files < 512b (bytes) #49

Open
marioscube opened this issue May 17, 2022 · 7 comments
Assignees
Labels
analyzing bug Something isn't working

Comments

@marioscube
Copy link

When trying to show a file in a browser that is smaller than 512 bytes, the content will not be shown.

Screenshot 2022-05-17 at 11 33 15
511b.txt
512b.txt

I do not know if this is a pupcloud or docker limitation (i fear the last).

@DarrenPIngram
Copy link

DarrenPIngram commented May 17, 2022 via email

@marioscube
Copy link
Author

Installed filebrowser in docker.......... Not very logical installation.

In filebrowser I can "view" the 511b file.
However I have the impression that filebrowser does NOT work the same as pupcloud.

I cannot rule out Docker.

@proofrock
Copy link
Owner

The file is there, but the mime type resolution fails. I use the internal Golang routines, that already gave proof not to be the most reliable of all (I even wrote it in the README). In our case, I suspect it offloads resolution to the operating system, that of course inside Docker is a different one (Alpine Linux) and may fail. It's strange that it happens only for <512bytes... anyway. Two possible solutions:

  • revert to mime type resolution only based on file extension
  • adopt a "more regular" linux distro for the docker image, but this would make for a huge image

...I have to re-check the go routines, however; I'll open a ticket in Go's language issue tracker to get more details.

@proofrock proofrock self-assigned this May 17, 2022
@proofrock proofrock added bug Something isn't working analyzing labels May 17, 2022
@DarrenPIngram
Copy link

DarrenPIngram commented May 17, 2022 via email

@proofrock
Copy link
Owner

Can't say about underlying system differences.

See my explanation above

@DarrenPIngram
Copy link

DarrenPIngram commented May 17, 2022 via email

@proofrock
Copy link
Owner

In Go. But probably it simply uses a different resolution method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzing bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants