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

Add file size information #26

Open
hellt opened this issue Jun 24, 2019 · 1 comment
Open

Add file size information #26

hellt opened this issue Jun 24, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@hellt
Copy link

hellt commented Jun 24, 2019

Hi, thanks for this awesome tool you've built.

have you considered to add a file size information to the served index page? It would help for an end-user to verify that the they download the right file, comparing the file size to the expected value.

@philippgille philippgille added the enhancement New feature or request label Jun 24, 2019
@philippgille
Copy link
Owner

Hi, thanks for the kind words!

I didn't consider adding file size information to the served index page yet, because so far the page isn't even generated by my own code, but instead by Go's standard library's http.FileServer().

But it definitely sounds useful!

We need to be careful to not make things slow though, for example when there are 1000 files in a directory, getting all file sizes in advance might make things slow, and only getting file sizes of the files of the visible lines while the user scrolls on the page would bloat the front-end and require a specific endpoint with pagination on the back-end or something similar.

When this feature is developed, maybe the program can check how many files are in the directory and then either show file sizes for all files or none at all. Try out what's the best number for that with doing some benchmarks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants