How to show texts instead of download button? #224

Closed
opened 2026-01-19 18:29:29 +00:00 by michael · 4 comments
Owner

Originally created by @khvnhtung on GitHub.

Hello,
Thanks for your interesting project. I've tried downloading and run in on my server. Uploaded several text files for testing but it seems that the website is not showing the texts but only download buttons. Is there an option to enable this?
Thanks.

Originally created by @khvnhtung on GitHub. Hello, Thanks for your interesting project. I've tried downloading and run in on my server. Uploaded several text files for testing but it seems that the website is not showing the texts but only download buttons. Is there an option to enable this? Thanks.
Author
Owner

@paolafrancesca commented on GitHub:

@khvnhtung the right tag is v1.1.6
please, use dutchcoders/transfer.sh:vX.Y.Z instead of latest since you'll be sure to have a proper release

@paolafrancesca commented on GitHub: @khvnhtung the right tag is `v1.1.6` please, use `dutchcoders/transfer.sh:vX.Y.Z` instead of `latest` since you'll be sure to have a proper release
Author
Owner

@paolafrancesca commented on GitHub:

it seems that lstat on the saved file (that will return the content type of the file to enable content preview) fails when running in the docker container: probably with the right user/volume setup in docker this issue would be solved.
anyway I'd rather refactored the code so that the content type is read from the metadata, where we have this info anyway, having no need to fetch the same from the file in the storage.
as soon as the docker image tagged v1.1.4 will be ready you can pull and the issue will be solved for you setup

@paolafrancesca commented on GitHub: it seems that lstat on the saved file (that will return the content type of the file to enable content preview) fails when running in the docker container: probably with the right user/volume setup in docker this issue would be solved. anyway I'd rather refactored the code so that the content type is read from the metadata, where we have this info anyway, having no need to fetch the same from the file in the storage. as soon as the docker image tagged `v1.1.4` will be ready you can pull and the issue will be solved for you setup
Author
Owner

@paolafrancesca commented on GitHub:

@khvnhtung please, provide some steps to reproduce the issue. maybe a screenshot as well
in the preview page with the download button there should be the preview of the content of the file, unless you uploaded the file without extension

@paolafrancesca commented on GitHub: @khvnhtung please, provide some steps to reproduce the issue. maybe a screenshot as well in the preview page with the download button there should be the preview of the content of the file, unless you uploaded the file without extension
Author
Owner

@khvnhtung commented on GitHub:

Screen Shot 2020-03-15 at 21 10 00 Here/s the preview of the text file that I have uploaded. The command I run is:
sudo docker run --publish 8080:8080 dutchcoders/transfer.sh:latest --provider local --ba
sedir /tmp/
@khvnhtung commented on GitHub: <img width="1125" alt="Screen Shot 2020-03-15 at 21 10 00" src="https://user-images.githubusercontent.com/33808069/76703087-55c7b100-6701-11ea-818c-d91b9cb22261.png"> Here/s the preview of the text file that I have uploaded. The command I run is: ``` sudo docker run --publish 8080:8080 dutchcoders/transfer.sh:latest --provider local --ba sedir /tmp/ ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dutchcoders/transfer.sh#224