[HN Gopher] Files - Single-file photo gallery and file manager
___________________________________________________________________
Files - Single-file photo gallery and file manager
Author : john-doe
Score : 304 points
Date : 2022-02-06 15:55 UTC (7 hours ago)
(HTM) web link (www.files.gallery)
(TXT) w3m dump (www.files.gallery)
| TekMol wrote:
| No license?
| quaintdev wrote:
| Great idea. I wish someone creates this in Go that way we don't
| even need to install php. Just run binary in directory and start
| browsing.
| dewey wrote:
| https://github.com/photoprism/photoprism comes pretty close
| ocdtrekkie wrote:
| Most shared web hosting already runs PHP, but anything newer
| like Node or Go won't generally work unless you have a more
| expensive hosting plan or cloud offering.
| qbasic_forever wrote:
| filebrowser is a nice option:
| https://github.com/filebrowser/filebrowser I don't think it has
| as slick of a photo view, but it does make it easy to spin up a
| server for files with a focus on editing.
| system2 wrote:
| It is hard not to get disappointed after seeing CDN loaded js
| files claiming single file. And the license part.
|
| Thanks, I will stick to my synology.
| littlestymaar wrote:
| > Instructions > Simply download index.php, drop into any folder
| and view from browser
|
| This is really where PHP shines. I find it really sad to see what
| PHP has become, just because people keep wanting to use it for
| complex stuff...
| cutler wrote:
| Yes, the Second Coming Of Java that was PHP5 was where PHP lost
| its DIY magic.
| sdze wrote:
| The magic of PHP is it's fantastic backwards compatibility.
| You can still execute PHP4 spaghetti code in PHP8.
|
| As side effect it even executes faster and uses less
| resources for it.
| oblio wrote:
| Executes faster and uses less resources for probably
| providing remote exploit opportunities :-))
| NaughtyShiba wrote:
| single .php file...
| qbasic_forever wrote:
| This is precisely the kind of thing that should be a single
| file CGI-like script. It's a much better view than the stock
| file listing Apache would spit out. There is no need to
| complicate it with microservices, high availability, event-
| based architecture, etc. It takes a single HTTP GET request and
| spits out HTML that nicely renders the content. That's all it
| needs to do. One file is perfect.
| codazoda wrote:
| I'm not sure if you're implying it isn't, that's bad, or
| something else. The download link does take you to a single php
| file. It's a mess, but it's also kinda interesting. I've been
| doing PHP dev professionally for more than 20 years and I don't
| think I've ever seen some of the conventions used. Even the PHP
| close tag inside a function like this.
|
| function login_page($is_login_attempt, $sidx, $is_logout,
| $client_hash){ ?> <!doctype html> <html> <head> <meta
| charset="utf-8"> ... </html> <?php exit; // end form and exit }
| wertgklrgh wrote:
| so what? it's simple and it works.
| dewey wrote:
| Some people make a million dollar a year with a single php file
|
| - https://remoteok.com/open
|
| - https://twitter.com/levelsio/status/1308145873843560449
| cutler wrote:
| Someone who really gets PHP.
| rodolphoarruda wrote:
| And here is the tweet which describes the stack. A single PHP
| file and Sqlite. This guy is my hero now.
|
| https://twitter.com/levelsio/status/1308406118314635266
| uglygoblin wrote:
| It doesn't mean they do all development in a single file.
| mberning wrote:
| I am still looking for a simple tool to deduplicate, organize,
| and tag all the photos I have accumulated over the years. Old
| laptop hard drives, old cell phones, iPhoto libraries, aperture
| libraries, etc. I want to dump them into a staging area, remove
| all dupes, and start organizing and tagging them into a folder
| structure.
| squarefoot wrote:
| I use regularly Shotwell to import from my camera and
| cellphones, and Geeqie works quite well in finding (also not
| exact) duplicates.
|
| https://wiki.gnome.org/Apps/Shotwell (it doesn't require Gnome,
| my desktop is XFCE)
|
| https://www.geeqie.org/
| Gorgor wrote:
| Have you looked at DigiKam? It offers directories, tagging
| (with custom tag hierarchies), deduplication and also face
| recognition. I think it can do quite a bit more, but I'm not a
| heavy user, at all. I just use it for keeping track of my
| modest library and it works great for that.
| mberning wrote:
| I will check it out
| pqdbr wrote:
| Does anyone know any open source library that provides this
| feature as a widget for a web app?
|
| I'd love to use Rails active storage + S3 to allow users to have
| a "mini Dropbox" inside my web App; the only one I could find
| that was nice enough was CKFinder, but it's not open source and
| it's tied to a Java or PHP backend as well.
| squarefoot wrote:
| The output is very polished and fast, I like it a lot.
| Unfortunately it's not technically a single file as it depends on
| code downloaded from their server, therefore it can't be deployed
| locally without Internet connection.
|
| From the forum:
|
| "In terms of license, you don't need an internet connection.
| However, Files app loads it's own Javascript, CSS and several
| plugins from CDN (jsdelivr.com), and this requires internet. We
| already have a request to allow serving all assets locally (as an
| option), although in your case that might not be practical as
| this means Files app is essentially no longer a"single file", but
| multiple files that you need to be included with each
| installation (although you could assign a global path perhaps).
| In any case, for now it's not possible to load Files app without
| internet."
| madduci wrote:
| A zip package containing all the files will be a single file as
| well :-)
| tentacleuno wrote:
| > In any case, for now it's not possible to load Files app
| without internet
|
| This is a major turn-off IMO. One of the main points of self-
| hosting is that you don't rely on the outer internet. If a
| self-hosted service relies on externally hosted resources, does
| this make it _partially_ self-hosted?
| EGreg wrote:
| Well, they can simply embed the static resources in the ph0
| file itself, why not?
| quenix wrote:
| Weird, they could embed all of this in the php file and echo
| it, keeping it one file.
| tentacleuno wrote:
| They sure could with a build script that just dumped all
| those resources into the single PHP file. It looks generated
| anyway.
| trvz wrote:
| A few alternatives have already been mentioned here; yet another
| one: https://larsjung.de/h5ai/
| quyleanh wrote:
| My favorite one for years of sharing files.
|
| This dev also has others cool tool. Check it out on his Github
| page [0]
|
| [0] https://github.com/lrsjng
| marban wrote:
| Is there an equivalent in Python (Albeit not single-file)?
| GOATS- wrote:
| Does something as simple as https://github.com/sc0tfree/updog
| count?
| airstrike wrote:
| Extra credit if not restricted to photos
| luluganeta wrote:
| How about Sigal? It's a Python static site generator for photos
| that works pretty well: https://github.com/saimn/sigal
| franciscop wrote:
| I started to make my own file editor, and I found that while the
| masonry-layout shown here (where different ratio pictures are put
| together to a common height) looks really pretty, I ended up
| preferring either cropping/zooming them or adding a margin and
| keep a square grid.
|
| Why? Because that allows you to easily click and drag a select
| area and select multiple pictures, where I can then click a
| button to tag them all at once. With Files Gallery, you cannot
| drag to select so this doesn't seem a concern, but then again I
| would love to be able to _manage_ files easily and not just look
| at them.
| huhtenberg wrote:
| As per [1] from below -
|
| Apparently it's a nag-based paid software with an otherwise
| restricted feature set. This is not clearly explained on the
| page.
|
| In fact, it looks like the site goes out of its way to try and
| pass for free software - the Demo is _NOT_ of what you are
| actually downloading, no pricing info, no mention of Basic vs
| Full versions anywhere, including the Docs, except for an dull
| looking blurb at the very bottom on the home page -
| License Files is free to use with basic features. To
| remove the license-popup and unlock additional features,
| you may purchase a license [$39] from within the app.
|
| The page also pulls a lot of scripts off the Internet on every
| load, so that too is not explained anywhere clearly and it's
| absolutely not good for hosting private photo archives.
|
| Despite its good looks it kinda leaves bad aftertaste because of
| all these shady shenanigans.
|
| [1] https://news.ycombinator.com/item?id=30235138
| jdrc wrote:
| Shareware
| oblio wrote:
| Hidden shareware. Kind of bad.
| jdrc wrote:
| Most shareware was nagware
| tentacleuno wrote:
| WinRAR was a great example. Now we have 7zip and PeaZip.
| Things evolve.
| simon04 wrote:
| Before that, we had WinZip, which is still around and
| trying to sell its program suite.
| eps wrote:
| Most shareware was upfront about being paid.
| simon04 wrote:
| > The page also pulls a lot of scripts off the Internet on
| every load
|
| It loads 14 resources from https://cdn.jsdelivr.net/npm/
| klyrs wrote:
| Does that make it a 15-file photo gallery and file manager?
| eps wrote:
| Absolutely.
|
| This also makes it completely broken if these dependencies
| are inaccessible or go missing.
| syoc wrote:
| There is also this gem.
|
| > Add username and password to protect your Files app by login.
| You can encrypt your password by using our md5() hash tool if
| you don't want the password to be exposed in the PHP file.
|
| Now I realize it's probably not using md5, but it does not bode
| well.
|
| [1] https://www.files.gallery/docs/config/#password
| seanw444 wrote:
| It looks like it links down to the PHP `password_hash`
| function, and there's this gem in the documentation [0]:
|
| > If your pepper contains 128 bits of entropy, and so long as
| hmac-sha256 remains secure (even MD5 is technically secure
| for use in hmac: only its collision resistance is broken, but
| of course nobody would use MD5 because more and more flaws
| are found)...
|
| Which means whoever developed this file photo app may have
| read this clear shot at MD5, and still used it anyways.
| That's kinda funny.
|
| [0] https://www.php.net/manual/en/function.password-hash.php
| tentacleuno wrote:
| > The page also pulls a lot of scripts off the Internet on
| every load, so that too is not explained anywhere clearly and
| it's absolutely not good for hosting private photo archives.
|
| Well to be fair, that can be explained by the whole 'drop this
| PHP file in and wham' model they are going for. Personally I
| would not advertise / make something like this as the single-
| file model becomes more and more of a constraint as the project
| evolves. It feels needlessly limited just to fit the single-
| file goal.
| ReactiveJelly wrote:
| They could bundle all the JS into the PHP file, though.
|
| In my more noobie days, I had PHP _generate_ JS.
| marban wrote:
| No pricing info?
|
| "Files is free to use with basic features. To remove the
| license-popup and unlock additional features, you may purchase
| a license [$39] from within the app."
| tentacleuno wrote:
| > No pricing info?
|
| Not clearly visible until you scroll down to the very bottom,
| no. Most paid projects like this (that _I_ have seen, anyway)
| have clear pricing info on the front page, or at least a
| _Pricing_ item in the navigation bar. This site has neither.
| I feel like this is a bit misleading as you 're immediately
| told to download the file, then perhaps discover that it is
| paid software later (or once you've already installed it),
| but I am willing to assume incompetence on the developer's
| part here.
| aembleton wrote:
| I've not tried this but as it's php, couldn't you just edit
| the file?
| unnouinceput wrote:
| Not really. This index.php is just a wrapper as it will
| refer their .js/.php which you have no control of. To use
| it fully you'll have to write those as well, at which point
| you can just start from scratch on your own terms.
| ReactiveJelly wrote:
| So is it running arbitrary PHP on my server if I run
| this?
| [deleted]
| [deleted]
| callalex wrote:
| For most of the 2000's shareware was the default software
| revenue model. I vastly prefer it to today's subscription soup.
| judge2020 wrote:
| Then maybe put a 'Purchase' button in the navbar. It's very
| easy to miss the 'license' portion at the bottom of the page.
| seszett wrote:
| I use https://sye.dk/sfpg/ myself, another single-file PHP photo
| gallery.
|
| It's less polished, but it's free.
| huhtenberg wrote:
| There are plenty of these.
|
| This submission is notable is because it's free _and_ polished.
| --- Edit ---
|
| AH, DAMN. It is NOT indeed free, at least not as demoed.
|
| The child comment below is 100% correct.
|
| It also pulls piles of stuff from cdn.jsdelivr.net and can't
| function without it. That's no bueno.
| forgottofloss wrote:
| > the original submission is free _and_ polished
|
| No, it's not free. Every time you load up the page to view
| _your own files_ with files.gallery, a big honkin ' pop-up
| shows up instructing you to buy a $40 license for additional
| features:
|
| Purchase a license [$39] to unlock features and support dev!
| - Remove this popup - Upload - Download folder - Code and
| text editor - Create new file - Create new folder - Rename -
| Delete - Duplicate file - Dedicated support - Multi-user,
| panorama and much more coming soon! [payment button]
|
| The files.gallery website only hints at this restriction at
| the very bottom of the page in the "License" section, which
| devs would expect to mean an OSS license: "Files is free to
| use with basic features. To remove the license-popup and
| unlock additional features, you may purchase a license [$39]
| from within the app."
|
| Now if you look at the rest of the landing page you can see
| it very carefully does not mention the ability to use _basic
| file browsing features_ so that it 's not technically a lie
| to present a tool that can "browse files and folders without
| complicated installations" that doesn't allow you to do
| anything more than download your own files without opening
| your wallet.
|
| The dev is just another hustler.
| huhtenberg wrote:
| ... and you are correct! Edited my comment above to reflect
| that.
|
| > The dev is just another hustler.
|
| But this was really uncalled for even if this does look
| kinda deceiving and dark-pattern-ish.
| dewey wrote:
| > The dev is just another hustler.
|
| Are you working for free or do you ask for a salary from
| your employer?
| ratsmack wrote:
| When you try and obfuscate the fact that it is a
| purchased product, it makes one a hustler. This is no
| different than the many click-bait sites that offer
| -free- stuff that are actually purchased items.
| dewey wrote:
| It's not obfuscated, the landing page says the following
| under the section "License".
|
| > Files is free to use with basic features. To remove the
| license-popup and unlock additional features, you may
| purchase a license [$39] from within the app.
| sdoering wrote:
| Maybe the dev isn't very clear about this. I agree it could
| be more clear up front.
|
| But does this mean devaluing their work by calling them
| "just another hustler"? I believe this isn't necessary.
|
| And sadly it totally devalues your comment for me.
| dewey wrote:
| > I agree it could be more clear up front.
|
| More upfront than under the "License" section on the
| landing page?
| oblio wrote:
| Which is at the bottom? It's like that by design.
| ratsmack wrote:
| I think what is worse is the fact that it is not a "one
| file app", and rather a php script that pulls in many js
| scripts of the net.
| chrissnell wrote:
| This is the Flickr-style photo layout that I love, but I want it
| in a static site generator. Does such a generator exist?
| sdoering wrote:
| In your sister comment there was a link to a repo generating a
| static sige:
|
| https://news.ycombinator.com/item?id=30234601
| john-doe wrote:
| `php index.php > index.html` should work, or from your browser
| "Save As..." index.html
| chrissnell wrote:
| That's a work-around, but not ideal. What I'd love to find is
| some CSS/JS that can build the beautiful Flickr-style[0]
| photo grids that I could integrate into a Hugo generator.
|
| [0] Flickr, for those who haven't used it much, came up with
| a unique way of displaying photos in a "justified" view so
| that there are no gaps between photos in a page full of
| images of various dimensions and orientations and so that all
| images stretch all the way to both edges and and are
| organized into neat rows with no vertical gaps. Example: http
| s://www.flickr.com/photos/defender90/albums/721576700986...
| chrissnell wrote:
| Just did some DDG noodling. Turns out, Flickr themselves
| have open-sourced this!
|
| https://github.com/flickr/justified-layout
|
| Now to look into porting this to Hugo.
| aspyct wrote:
| Oh boy, this may have solved one of my problems. Will try it
| asap!
|
| Edit: oh, it's not free... I mean, $40 isn't bad, but then I
| expect a decent level of support. Also, $40 for... a year, a
| life?
| max1cc wrote:
| Why does the demo have a folder of just girls?
| jbverschoor wrote:
| Because it's about *single* files
| can16358p wrote:
| Sex sells, as always.
| [deleted]
| mackrevinack wrote:
| wild guess: the person who make this likes girls
| jack_riminton wrote:
| To drive engagement through people commenting on it
| jbverschoor wrote:
| He can post to https://www.reddit.com/r/UpvotedBecauseGirl/
| saheelraut wrote:
| It drives curosity for sure.
| Aeolun wrote:
| This is an MVP. The guys folder will be added later.
| yjftsjthsd-h wrote:
| Why not?
| codechad wrote:
| kazperson wrote:
| I needed this for hosting an archive of documents and images that
| I didn't want to sort and create html pages for. Without
| something like this, I'd get an ugly directory view that's
| different browser by browser.
|
| This solves the problem and it looks elegant. Great work.
| ropeladder wrote:
| As somebody who recently spent two weekends trying to figure out
| a self hosted photo solution that actually for my needs and was
| easy to install, this looks fantastic.
|
| (I ended up using PhotoView, which works fine, but this looks
| like it might have been better.)
| NKosmatos wrote:
| Hey thanks for sharing with us https://photoview.github.io It's
| worth a look :-)
| leavenotracks wrote:
| Had a look, and it was worth it! Will consider using for sure
| stakkur wrote:
| * Not free (mostly crippleware)
|
| * Requires a server to run (you don't just 'open from browser' as
| instructed
|
| * CDN-dependent
|
| This...is not terribly good or useful.
| kbrisso wrote:
| Very nice tool indeed, funny how the world works. I'm writing an
| Electron/React/PouchDB application that works kinda like this
| called "Filebase", you create a library and name it like
| "pictures", you pick a directory / or single file on your PC and
| it scans/indexes it, this allows you to tag individual files and
| folders so you remember what's in it (you can search these tags).
| you can search and filter by type. The last feature will be
| archiving but keeping the directory info handy so you can search
| for items that are archived. I came up with this idea after
| watching my partner try and organize Cricket art and PDF's. I
| realized that Windows Explorer kinda sucked for organizing. I
| wanted to build something that did not modify or touch files
| itself. It's been a great way to learn Electron. I have to say
| Electron makes building UI's easy for applications.
| FairDune wrote:
| The browser simply displays the local php source for me. Do I
| need to run a local PHP server to get this to run?
| tentacleuno wrote:
| Yes, you'd need to deploy a PHP interpreter on your machine
| (and then point it at this file) to run it.
| MildlySerious wrote:
| I just want to say that the minimal design of the site feels very
| pleasant to me. Some days I struggle to make the simplest things
| feel right even with tools like Tailwind. Well done!
| ohlookabird wrote:
| I only get this when loading the page:
|
| This page crashed. Cannot read properties of undefined (reading
| 'destroy')
| Aeolun wrote:
| My first thought when seeing this was whether I could run it as a
| docker image... I don't know what's wrong with me :P
| setum wrote:
| Nothing. My first thought as well. I have a NAS and a bunch of
| self hosted apps running on kubernetes. Something like this
| will be really useful.
| cutler wrote:
| There's a rehab app for that.
| wodenokoto wrote:
| These were the knees beeswax back in the day.
|
| I'm sure there are still dozens of open source alternatives
| floating around - some surely even maintained!
| red_admiral wrote:
| I really don't mind charging for software, as developers need to
| eat as much as the next person. $39 for something like this is
| really not excessive.
|
| But I think it could have been made clearer that (1) you only
| download one file but it loads more from their CDN, it's not
| truly "single file" and (2) the free version is heavily limited
| and gated with a pop-up.
|
| That said, I like the demo - it looks really slick and has a lot
| of features.
| fpoling wrote:
| Does it at least specify hashes for files from CDN?
| pmontra wrote:
| I used https://github.com/Jack000/Expose a couple of times.
| Advantage: it generates a static site. Disadvantage: it must be
| customized almost certainly. It's a bash script.
| pkdpic wrote:
| I like what I see on the site and in the comments here. Im
| looking forward to checking this out more maybe.
|
| Im kind of surprised that as a species we dont have a conclusive
| ubiquitous solution to the foggy problem of digital photo storage
| / management. So many of my photos are just in drawers on old
| hard drives and phones.
|
| Anyway maybe its getting better. Or maybe Im just stupid.
| jrm4 wrote:
| The answer is simple, it's just kind of says an ugly thing
| about how computing has shifted; it's essentially the same
| reason e.g. the iPad didn't have a file manager.
|
| Interfaces got really good and slick at the same time it became
| profitable/useful to alienate people from their own data for
| profit.
| jdonaldson wrote:
| Files have some drawbacks... they're difficult for multiple
| people to work on together (slides). They're often not easy
| to organize, and they're often not available where you want
| them.
| tentacleuno wrote:
| If you use something like Syncthing[0] (great, can
| recommend) you'll get them available exactly where you want
| them: on all your devices.
|
| The only real problem with it is conflicts, where one file
| is edited simultaneously on two devices. I think Dropbox
| has solved that (?), but I'd rather keep my data on my own
| computers.
| jrm4 wrote:
| Syncthing handles conflicts about as elegantly as
| possible, I think?
| tentacleuno wrote:
| They do, but it's still a PITA when one comes up. It's
| great with KeepassXC database files because you can use
| the Merge databases function to manually merge the two
| databases (then delete the .sync-conflict).
| jrm4 wrote:
| You can have other interfaces in addition to the files,
| that discourage, perhaps strongly, getting to them
| directly.
|
| But it's always been straight up evil to completely remove
| all meaningful access to them, and yet Apple et al chose to
| go in this direction.
| distrill wrote:
| I understand the risks of this approach, but I just dumped
| everything into google photos and I'm very happy with how it's
| working for now. I do not miss the days of keeping track of
| those devices at all.
| subpixel wrote:
| The thing about Google photos that explodes my brain is that
| if I use albums to share with family members, Google
| prioritizes the use case of the recipients _joining_ the
| album and _adding_ my photos to their own albums. Google is
| trying to use me as a way to get my family members signed up
| for Google photos.
|
| Then my family is confused about where photos live, etc.
| pkulak wrote:
| That was my solution since 2011, but just a few months ago I
| bought a nas that came with a Google Photos clone and moved
| everything over to that. Too scary knowing that Google can
| and will lock me out of my account at any time and forever.
___________________________________________________________________
(page generated 2022-02-06 23:00 UTC)