[GH-ISSUE #300] Preview text file #156

Closed
opened 2026-04-08 16:50:44 +03:00 by zhus · 7 comments
Owner

Originally created by @vnghia on GitHub (Nov 27, 2023).
Original GitHub issue: https://github.com/sigoden/dufs/issues/300

Specific Demand

Sometimes I want to have a way to view my configuration files (yml) without downloading it into my machine first.

Implement Suggestion

We've already had an edit panel inside dufs. I think we could just add an eye icon and when that button is clicked, we open the editor without allowing editing.

Thank you for a wonderful software and I can send a PR if you think this make sense.

Originally created by @vnghia on GitHub (Nov 27, 2023). Original GitHub issue: https://github.com/sigoden/dufs/issues/300 ## Specific Demand <!-- What feature do you need, please describe it in detail. --> Sometimes I want to have a way to view my configuration files (`yml`) without downloading it into my machine first. ## Implement Suggestion <!-- If you have any suggestion for complete this feature, you can tell us. --> We've already had an edit panel inside dufs. I think we could just add an `eye` icon and when that button is clicked, we open the editor without allowing editing. Thank you for a wonderful software and I can send a PR if you think this make sense.
zhus closed this issue 2026-04-08 16:50:44 +03:00
Author
Owner

@sigoden commented on GitHub (Nov 27, 2023):

Putting configuration config.yaml under the dufs's serve path is dangerous. Strongly recommend users not to do this.

<!-- gh-comment-id:1828582437 --> @sigoden commented on GitHub (Nov 27, 2023): Putting configuration `config.yaml` under the dufs's serve path is dangerous. Strongly recommend users not to do this.
Author
Owner

@vnghia commented on GitHub (Nov 27, 2023):

Ah no, not the config.yaml of dufs. I use dufs to browsing the content of several docker named volumes cause I don't want to go with the terminal. And of course, it is only accessible with a VPN.

Edit: For more context, I use some kind of Infra-as-Code to generate pretty much every configuration files in my docker stack. Sometime, thing does not work out as expected and I want to view what is wrong with my configuration file on some docker named volumes. I know I can click on edit button and not edit it. But I guess a view only button seems more reassuring.

<!-- gh-comment-id:1828588453 --> @vnghia commented on GitHub (Nov 27, 2023): Ah no, not the `config.yaml` of `dufs`. I use `dufs` to browsing the content of several docker named volumes cause I don't want to go with the terminal. And of course, it is only accessible with a VPN. Edit: For more context, I use some kind of Infra-as-Code to generate pretty much every configuration files in my docker stack. Sometime, thing does not work out as expected and I want to view what is wrong with my configuration file on some docker named volumes. I know I can click on edit button and not edit it. But I guess a view only button seems more reassuring.
Author
Owner

@sigoden commented on GitHub (Nov 28, 2023):

I misunderstood.
You can directly view the text file by clicking it's link.

image

<!-- gh-comment-id:1828609653 --> @sigoden commented on GitHub (Nov 28, 2023): I misunderstood. You can directly view the text file by clicking it's link. ![image](https://github.com/sigoden/dufs/assets/4012553/e5fe50b3-4f6b-4ed5-91e2-7f20986ba863)
Author
Owner

@sigoden commented on GitHub (Nov 28, 2023):

image

<!-- gh-comment-id:1828611878 --> @sigoden commented on GitHub (Nov 28, 2023): ![image](https://github.com/sigoden/dufs/assets/4012553/b72dc68c-89b6-4fea-b9ee-be6c6c274672)
Author
Owner

@vnghia commented on GitHub (Nov 28, 2023):

I guess it is browser specified. Because when I tried to do the same thing with firefox, it will download that file instead of showing previewing. It does show a preview for xml and json but not yaml

<!-- gh-comment-id:1828612949 --> @vnghia commented on GitHub (Nov 28, 2023): I guess it is browser specified. Because when I tried to do the same thing with firefox, it will download that file instead of showing previewing. It does show a preview for `xml` and `json` but not `yaml`
Author
Owner

@sigoden commented on GitHub (Nov 28, 2023):

#301 supports this feature.

<!-- gh-comment-id:1828786559 --> @sigoden commented on GitHub (Nov 28, 2023): #301 supports this feature.
Author
Owner

@vnghia commented on GitHub (Nov 28, 2023):

Thank you so much for this awesome software 🚀

<!-- gh-comment-id:1828800809 --> @vnghia commented on GitHub (Nov 28, 2023): Thank you so much for this awesome software 🚀
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sigoden/dufs#156