Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Hi, Files app DEVELOPER here. Someone notified me that the app had been posted here. A lot of negative comments, which I don't have a problem with, but I can perhaps clarify a few things.

About Files app not being "single file" because it loads JS/CSS resources from the CDN (internet). That is of course a correct observation, and this is already noted on the website. From an operational perspective, there is only one file to download/move/install, and from a functional perspective for the vast majority, it will be viewed in browser with an active internet connection. Furthermore, it was INTENDED BY DESIGN to load all JS/CSS from CDN, because ultimately it improves the user-experience, and makes it plausible to make an app like this wrapped into a single index.php file.

It's not reasonable to add ALL Javascript/CSS directly into the index.php file. PHP is only 10% of the codebase, and it would bloat the file to insane dimensions and make it difficult to maintain. JS/CSS is loaded from CDN service jsdelivr.com, with multi-level redundancy (Amazon, Cloudfront, Cloudflare), and will load faster and cache more effectively than anything served from within the index.php app on your own server. Furthermore, some plugins are served on-demand, for example when browser needs a "polyfill" or for specific features. For functional reasons, benefiting the vast majority who do not care how/where the JS/CSS is loaded from, JS and CSS files are therefore served from CDN. If this does not suit you, nobody has any problem with that.

Does anyone have any examples of any other single-file app with a comprehensive interface like Files app that is entirely self-contained?

There will be a future release where you can assign all scripts/css to be loaded from local path, but then of course all these files will need to be installed alongside Files app index.php. We will NOT be adding all JS/CSS directly into the index.php file.

About license, as stated on the website, you can use it as a file viewer for free (with the nag). If you want to remove the nag and use it as a file manager, license is required. Those who expect apps like this to be entirely free with updates and support, are living in dream land. It's hardly worthwhile in the first place. There are loads of other free apps, and if you can't see any difference, then your choice is easy.

I have noted comments about license info being unclear, thanks.



> Does anyone have any examples of any other single-file app with a comprehensive interface like Files app that is entirely self-contained?

phpLiteAdmin (https://github.com/phpLiteAdmin/pla) is developed as separate PHP, JS, and CSS files. A "build" script merges all into a single PHP script, which includes compressed resources inlined after a call to `__halt_compiler()`. The same code can run as separate files, or as a single one.

I wrote the original "build", years ago, as we started extracting classes out of a procedural single file.

[edit] Link to the interesting bit: https://github.com/phpLiteAdmin/pla/blob/master/phpliteadmin...


That's good, but surely you won't compare phpliteadmin with Files app in terms of the interface.


   Furthermore, it was INTENDED BY DESIGN to load all JS/CSS from CDN, because ultimately it improves the user-experience, and makes it plausible to make an app like this wrapped into a single index.php file.
I get the rest of the points you're making but I think the flak you're getting is largely about what you consider the "user" here. You're responding from the point of view of the person I am sharing my photos with, whereas most of the respondents are responding from the point of view of the me, the guy who is gonna actually use this app. There's a mid-sized vocal crowd of self-hosters here on HN and from my own observation a tendency to prefer control over these sorts of things.

   Does anyone have any examples of any other single-file app with a comprehensive interface like Files app that is entirely self-contained?
Your app is, as you noted, not single-file. Setting that aside though, the density of the interface is kind of irrelevant to where the CSS and JS are hosted. There's loads of on-premise enterprise apps that do not load data from CDNs and have much more convoluted user interfaces. Plus they work on an otherwise disconnected network, do not subject users to potential tracking, etc.

I would also warn you, having seen this happen to a friend's project, the absence of any robust license text inside the package and/or spelled out on the website is going to give you some headaches. For example, does "use" of the app include customization? What type of customization is possible and accepted? If you allow some customization, you'd need to be careful to spell out explicitly that people can't just edit the PHP and remove the nag, etc.

One other thing to note: The application is very vulnerable to Cross-Site Scripting.


> It's not reasonable to add ALL Javascript/CSS directly into the index.php file. PHP is only 10% of the codebase, and it would bloat the file to insane dimensions and make it difficult to maintain.

I guess no one says that's the way you want to maintain the project. The final `index.php` with HTML/CSS/JS can just be built out of parts that can be maintained separately.


You can easily bundle all resources in that PHP as someone said. Or the script can download them from CDN and cache locally and then use the local version. I also don't like external resources, it makes no sense. It is often not even faster as most people think. It is fast only if that file is already cached in the browser and given the number of various js/css projects and their versions it is generally unlikely to have the proper version cached.


Great work, I love this! Don't let the petty comments drag you down.

> Does anyone have any examples of any other single-file app with a comprehensive interface like Files app that is entirely self-contained?

Adminer comes to mind: https://www.adminer.org/ https://github.com/vrana/adminer/

As far as I can tell, they "compile" everything, including JS, into one PHP file.


I don't know PHP that well, but could the JS/CSS/Images be base64-encoded inside the PHP and decoded and streamed out on demand?


This looks great, and like something I was looking for a couple of months ago. I couldn't find anything, so I created my own [0] (limited) solution. But the Files app looks like it might replace this.

[0] https://j11g.com/2021/11/23/corbin-static-responsive-image-a... [1] https://github.com/jan-vandenberg/corbin


Hijacking top comment with a shallow compliment and a self-promo is not nice.


Apologies. I asked the mods to delete my comment, because this was not my intention.


Maybe they can orphan it. It will work in context


It was a fine comment and I don't think there was any intention to hijack the thread - but I've detached it from https://news.ycombinator.com/item?id=30241128 now.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: