Skip to content

Auto upload overwrites existing files #1736

Closed

Description

@atroxix

Actual behaviour

I have enabled auto upload on my camera images and also enabled option that the files are moved from camera to NextCloud.

Now I discovered that if my images start at DSC_0001.JPG then after moving the next photo taken is named the same and when uploaded to NextCloud folder, it will not be named as "DSC_0001 (1).JPG" as was done in previous releases, but it will overwrite existing file.

For instance, I have now in my previous month's folder image DSC_0001.JPG with 10 different versions. I guess I will eventually lose data because some versions will be automatically removed by some internal clean-up logic, right?

Expected behaviour

Duplicate files should be uploaded with a different name.

Steps to reproduce

  1. Enable auto upload of DCIM/100ANDRO folder for instance.
  2. Set option "Original file will be... " to "moved to app folder"
  3. Create new photo, let it be uploaded/moved to NextCloud
  4. Create another photo that will be named the same as the previous one, let it be uploaded/moved to NextCloud

Environment data

Android version: 7.1.1
Device model: Sony Xperia Z5 Compact
Stock or customized system: stock
Nextcloud app version: 2.0.0
Nextcloud server version: 12.0.3

Activity

  1. papjul commented on May 16, 2018

    @papjul

    This looks like a major regression to me, is it currently being worked? I found out a lot of my pictures disappeared (thankfully old versions were saved but I have to copy and then restore which is annoying) because my camera had the same naming convention (DSC_0001, etc).

    @atroxix Did you find a workaround since November?

  2. tobiasKaminsky commented on May 17, 2018

    @tobiasKaminsky
    Member

    @mario I remember that you assumed that if a file is uploaded and a file with the same file name is change/created that it is the same file and thus should be overwritten.
    It seems that this assumption is not valid for all use / use cases.

    To prevent data loss, it is better to never overwrite an existing (uploaded) file, though I do like the original idea…

  3. mario commented on May 17, 2018

    @mario
    Contributor

    This is honestly a problem with the devices. Also, how else do you plan to upload changed files if not by overwriting?

  4. tobiasKaminsky commented on May 17, 2018

    @tobiasKaminsky
    Member

    If you manually upload the same (or changed) file, but with same file name, twice, it does not get overwritten, but appended a (2).
    Overwriting a file without user confirmation, is maybe to hard for auto upload, unless we are really sure that it is the same (and changed) file.

    Unfortunately I do not have a solution either.

  5. atroxix commented on May 18, 2018

    @atroxix
    Author

    Hi. Sorry for slow feedback. I didn't find a way to fix the issue, but as a workaround I just started cleaning up my folder of taken photos on monthly basis or so (since I keep uploaded photos in monthly folders).

  6. stale commented on May 10, 2019

    @stale

    This request did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

  7. caco3 commented on Sep 23, 2019

    @caco3

    I have exactly the same problem. I would have lost a lot of photos if the files version function would not have worked!

    My usecase:
    I use a smartphone where the stock camera names the images with the format DSC_0001.JPG. Since the device is unrooted, I can sadly not improve this ugly behaviour.
    To save memory, I let the nextcloud client move the images to my SD card after uploading them.
    How ever this makes the camera app to start at number 1 again and again.
    The nextcloud app blindly overwrites the files on the server then...

    NB:

    • The camera could directly write to the SD card, how ever this is not reliable and lead to issues sometimes (SD card not mounted).
    • Keeping the photos in the folder instead of moving them to the nextcloud client folder makes it hard to see which photos got already uploaded. I had used it this way but had experienced photos not uploaded and always a full internal memory.
    • There is a tool "DSC Auto rename" (https://play.google.com/store/apps/details?id=ro.ciubex.dscautorename&hl=de) which can rename the files automatically, how ever it interferes with the auto upload functionality.

    Suggested solutions:

    • The nextcloud app could have an option to rename files if they have such filename format.
    • The nextcloud app could provide a delay so DSC auto renamer could do its work first.
    • The nextcloud app could provide an option to rename files if they exist on the server
  8. caco3 commented on Sep 23, 2019

    @caco3

    Note: There is a still open duplicate of this issue under #1239

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions