Coder Social home page Coder Social logo

Comments (18)

Tschuuuls avatar Tschuuuls commented on May 11, 2024 3

Photo Sync does exactly this. Creates a Folder with device name, then subfolders for all the "Albums" on iOS/Folders on Android. It also preserves original Filenames.
This behavior is pretty neat if you ever need to manually go in and look for a photo on an SMB share for example.
Would be awesome, if Immich could work with those backups :)

from immich.

alextran1502 avatar alextran1502 commented on May 11, 2024 3

@klaus1k Yes, the feature just got implemented #1098 it will be available on next release

from immich.

comfreak89 avatar comfreak89 commented on May 11, 2024 2

Yeah, its quite confusing when all photos are in the same folder - inclusive Telegram, Whatsapp, etc...

from immich.

jbaez avatar jbaez commented on May 11, 2024 2

I think albums #147 could be an alternative to replicating the folder structure in the server. That way from the client app, the photos can be organized in albums. Also, now that the "selective folders backup" feature has been implemented #137, there is no need of uploading all folders from the device.

With respects to what you'd like, I think an album is not the same or sufficient to "replicating" what the user here has asked for, which is preserving the folder structure, which I agree and I am a little surprised it doesn't do because the whole point of a backup is to restore and you can't do that if it's all changed.

An album can be created from videos/photos from various cameras and someone may prefer to have folders based on the source the photo/video was taken. So for example content from a digital camera and a smartphone camera are in two different directories, one can create an album from those, and tags can be based on subjects within the photo or video. When people start mixing up these structures, it kind of defeats the purpose.

🤔 Interesting point, but I see some issues with it.

For example, for uploading photos taken with a camera, that would need to be done from a future Web app, where you select photos from the file system to upload. In this case there is no "folder structure". The only way to have a folder structure would be to implement a Dropbox-like client to install in the computer (huge project on it's own, and Nextcloud already does this and it's great 😄), or to manually enter a folder destination when uploading.

The way I see the "backup" feature, is to have the photos from some folders in the phone backed up in case you lose the phone or your phone breaks. I'm not sure a feature to restore photos/videos to the original location in the phone would be a useful feature.

Another possible issue is having 2 mobile phones with the same folder structure. That would cause having a single folder structure for both devices with additional chance of name collision (if file names are also preserved)

I would normally have only my phone camera folder as auto-backup, and then maybe manually add a photo from WhatsApp (for example). This scenario is similar to the first example, I'm not sure you could get the folder structure in a "selected photos" context, and if it is possible, I think it might be unnecessary to create WhatsApp folder with those selected photos in the server.

I think the way the photos are organized in the server should be simple, performant and scalable. At the end of the day although the uploaded photos folder can be in a Docker bind mount to some folder in the NAS / Server (which would probably benefit from some folder structure) the normal way of using it in "production" would be having a Docker volume mount (more performance) or a Kubernetes volume (if running in K8), so the folder structure would not be easily accesible anyway.

Although a single folder would be "mixing up" photos from different devices, each photo should have metadata with its original name, camera used for taking the photo, etc. which could be used for filtering if needed.

Finally, I think one essential thing to have, is an export feature. This could export all the photos using the albums as folder structure and preserving the original names (like you would get by using Google export), so at least the organization done in the app using albums is not lost and you don't end up with a single folder with random photo names 😄

from immich.

ADIX7 avatar ADIX7 commented on May 11, 2024 2

What about imageName from exif table and the current UUID? So something like originalName-UUID.originalExt for file name. Names collisions cant happen and every data is present currently so migration is not that hard.

Currently browsing is immich backup directory with samba/sftp/etc is not so convenient because the files are in a totally random order. Most phones and cameras put date and time to file names so they are order. Using only UUID in file names puts them in a random order. By using originalName-UUID format they would be mostly in date order and would be much more searchable.

from immich.

ilkersigirci avatar ilkersigirci commented on May 11, 2024 1

Thank you for this update. Just awesome. Now can use immich as my main cloud photo storage for all my devices.

from immich.

jbaez avatar jbaez commented on May 11, 2024

I think albums #147 could be an alternative to replicating the folder structure in the server. That way from the client app, the photos can be organized in albums. Also, now that the "selective folders backup" feature has been implemented #137, there is no need of uploading all folders from the device.

from immich.

Atemu avatar Atemu commented on May 11, 2024

I'd also prefer if the file names were preserved.

Perhaps the files could be stored in $UUID/$FILENAME; i.e. original/80c75488857f94b5256f249925f73d5338f450db20c7fdd9f16f123e6dde9da0/08245964-3349-4469-a2f5-1d0e49122d94/actual-filename.jpg

from immich.

Savasdotexe avatar Savasdotexe commented on May 11, 2024

I think albums #147 could be an alternative to replicating the folder structure in the server. That way from the client app, the photos can be organized in albums. Also, now that the "selective folders backup" feature has been implemented #137, there is no need of uploading all folders from the device.

With respects to what you'd like, I think an album is not the same or sufficient to "replicating" what the user here has asked for, which is preserving the folder structure, which I agree and I am a little surprised it doesn't do because the whole point of a backup is to restore and you can't do that if it's all changed.

An album can be created from videos/photos from various cameras and someone may prefer to have folders based on the source the photo/video was taken. So for example content from a digital camera and a smartphone camera are in two different directories, one can create an album from those, and tags can be based on subjects within the photo or video. When people start mixing up these structures, it kind of defeats the purpose.

from immich.

alextran1502 avatar alextran1502 commented on May 11, 2024

@Savasdotexe I agree with you. I've put more thought into this after the implementation of the selective backup features.

Since I can pull information from the asset's original folder from the mobile phone, it will also be nice to have them in the same structure on the server after backing up.

from immich.

Savasdotexe avatar Savasdotexe commented on May 11, 2024

🤔 Interesting point, but I see some issues with it.

For example, for uploading photos taken with a camera, that would need to be done from a future Web app, where you select photos from the file system to upload. In this case there is no "folder structure". The only way to have a folder structure would be to implement a Dropbox-like client to install in the computer (huge project on it's own, and Nextcloud already does this and it's great 😄), or to manually enter a folder destination when uploading.
...

Well, those aren't really issues to what I said, besides a lot of external cameras sync with phones and tablets now days so they would still be using the same device.

Lets say you go on holiday, you takes pictures with your phone camera, your gopro and also digital camera (which both syncs photos/videos with the phone) and you also receives photos from a friend which went with you, via WhatsApp. You obviously would want a way to distinguish it from the others photos/videos and easily access it, so you would ideally create an album and lets say "Holiday trip 05/2022" and mark all those pictures into the album. You shouldn't be messing around with moving files, secondly if you did then WhatsApp app will not be able to locate the media files. Other applications may also have trouble finding its photos if it's not in the respected directories again. If you create copies then you're wasting storage.

Lets say something happens to your phone, but you had to factory reset losing all your videos/photos. The difference between folders and albums is evident here. All your photos are in the respected folders, an album is a collection for easy access. You could use albums to mimic folders, but it's just an extra step and misusing the term, plus upon restore potentially adding more work.

The way I see the "backup" feature, is to have the photos from some folders in the phone backed up in case you lose the phone or your phone breaks. I'm not sure a feature to restore photos/videos to the original location in the phone would be a useful feature.

The whole point of a backup is to potentially restore it exactly where it was so if you think it's not useful to do that, you're kind of missing the point. This is kind of unrelated to the topic here, but to answer you I presume that choice could be presented when you come to restore.

People prefer seamless operation, so backing up everything as you go is the way to go and having the user take steps to do this while it should be default is a bad call.

Another possible issue is having 2 mobile phones with the same folder structure. That would cause having a single folder structure for both devices with additional chance of name collision (if file names are also preserved)

Definitely a solvable issue.

from immich.

spupuz avatar spupuz commented on May 11, 2024

If having too many pictures in the same folder could lead to have problem ok listing them. Need to backup pic in year / month / day folder structure

from immich.

ggantn avatar ggantn commented on May 11, 2024

+1 for me.

from immich.

alextran1502 avatar alextran1502 commented on May 11, 2024

@ADIX7 I like your suggestion

from immich.

Atemu avatar Atemu commented on May 11, 2024

I also like it.

One thing to keep in mind is that a UUID string in the file name could make it long enough to cause issues on some platforms, some apps or file systems (namely Windows) under some circumstances.

This is an issues systems that use strong hashes in file names sometimes face. UUIDs are probably mostly fine but just something to keep in mind.

from immich.

mammo0 avatar mammo0 commented on May 11, 2024

What about the suggestion of @Tschuuuls?

Creates a Folder with device name, then subfolders for all the "Albums" on iOS/Folders on Android. It also preserves original Filenames.

At the same time the feature request from #537 can be implemented, so a virtual album in Immich is also created.

My suggestion for the directory structure for uploaded photos from mobile devices:

<immich-assets-dir>/<immich-username>/<device-name-or-id>/<immich-album-id>-<immich-album-name>/<original-file-name>

I know that this does not preserve the original path like it's on the mobile device. But it's still human readable if you need to access the files directly e.g. via SMB.

But how should files be handled that were uploaded via the CLI tool or the web interface? My suggestion:

  • the user uploads only some random photos:
    <immich-assets-dir>/<immich-username>/upload/<upload-timestamp>/<original-file-name>
    
  • the user uploads photos that should be added to
    • a new album

      <immich-assets-dir>/<immich-username>/upload/<immich-album-id>-<immich-album-name>/<original-file-name>
      
    • an existing album

      <immich-assets-dir>/<path-to-existing-album>/upload/<upload-identifier>/<original-file-name>
      

      <path-to-existing-album>: Can also be the directory of another user if it's a shared album and the current user as write permissions on it.

      <upload-identifier>: Normally the (UTC) timestamp of the upload should be sufficient here. But if an user uploads something to an existing album of another user, the username of the uploader should be added: <upload-timestamp>-<immich-uploader-username>

I don't know if a user can currently define an album to which the photos should be added after the upload.

I currently see two problems with my suggestion:

Pleas let me know your thoughts on this.

from immich.

klaus1k avatar klaus1k commented on May 11, 2024

Hey,
hope this is the right issue, didn't find a dedicated one on file names: I would love to have the photos backed up as they are - e.g. having their original filename preserved.

This would be perfect for my use case:
<immich-assets-dir>/<immich-username>/upload/<original-file-name>

Is anything planned on this?

P.S. Love the project!

from immich.

klaus1k avatar klaus1k commented on May 11, 2024

Awesome, thanks!

from immich.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.