Skip to content

Sharing images from other apps removes EXIF location on Android > 10 #6248

Open

Description

@AykutCevik

Steps to reproduce

  1. Take a picture with a camera app which writes also GPS data into the picture
  2. Ensure GPS data is written into the picture with different apps like file browser or gallery app
  3. Upload this picture with the Nextcloud Android app version 3.11.1 via the share menu from gallery app
  4. Download picture from Nextcloud instance with a browser and look at the GPS data of the file
  5. See that the GPS data is missing or more likely set to zero

Expected behaviour

  • Pictures shouldn't lose their GPS data while uploaded through the app
    grafik

Actual behaviour

  • Pictures are missing GPS data after upload
    grafik

Can you reproduce this problem on https://try.nextcloud.com?

  • Upload through the browser to Nextcloud works fine, just app removes the informations

Environment data

Android version: 10 (OxygenOS 10.3.3)
Device model: OnePlus 6T
Stock or customized system: Stock
Nextcloud app version: 3.11.1
Nextcloud server version: 18.0.5
Reverse proxy: Nginx

Logs

Web server error log

Nothing worth to mention

Nextcloud log (data/nextcloud.log)

Only related to "Maps" app while trying to analyze the image since the GPS data is wrong.

Nothing worth to mention

I faced this issue since I saw that the pictures weren't showing up in the Maps app of Nextcloud. So this is not a new issue. Also I can surely say that the problem started before 20th of April, so also with a prior version. I can share pictures in a PM.

Appreciate any ideas for solving this issue.
Thank you for your great work!

Activity

  1. strugee commented on Jun 9, 2020

    @strugee
    Member
    3\. Upload this picture with the Nextcloud Android app version 3.11.1
    

    How are you uploading the picture? Auto Upload? The "Upload files" button? The "Upload content from other apps" button?

    Stock or customized system: FALSE

    Does this mean you have a stock system? (I.e. the version of Android that came with your phone)

    Reverse proxy: FALSE

    I believe this question is asking what web server you access Nextcloud through.

  2. added
    needs infoWaiting for info from user(s). Issues with this label will auto-stale.
    on Jun 9, 2020
  3. AykutCevik commented on Jun 9, 2020

    @AykutCevik
    Author

    @strugee updated the issue.

    Trying several other uploads, I found out that the issue may not be related to the Nextcloud app itself.

    I've uploaded pictures through the share menu from both apps:

    • OnePlus stock gallery app
    • Simple gallery app (com.simplemobiletools.gallery.pro)

    Both uploads resulted in setting the GPS data to zero.

    Upload through a file browser like "Amaze" or through the Nextcloud app itself didn't change the GPS data.

    Tricky one! I will contact the app maintainers and reference to this issue here.

  4. AykutCevik commented on Jun 9, 2020

    @AykutCevik
    Author

    I have to reopen it again since I'm not quite sure how to debug this issue without brainstorming/information from here.

    The "simple gallery" app provider said that they don't change the image beforehand. What could be the problem?

  5. InfamousUser commented on Jun 10, 2020

    @InfamousUser

    I think it is usual for sharing application to remove metadata, it used to be a huge privacy leak sending images over IMs that turned out to contain user's exact coordinates.
    Not sure if cloud backup tools should do it, they should not IMO, but it could be normal, somebody will know more about this.

  6. AykutCevik commented on Jun 11, 2020

    @AykutCevik
    Author

    Also to reference a comment which describes exactly the same thing: nextcloud/maps#361 (comment)

  7. strugee commented on Jun 11, 2020

    @strugee
    Member

    Upload through a file browser like "Amaze" or through the Nextcloud app itself didn't change the GPS data.

    How exactly did you upload in all of these apps? Did you use the "Share" button in Amaze? In Simple Gallery? In the stock gallery? In general the more information and specifics contained in a bug report, the better.

  8. AykutCevik commented on Jun 11, 2020

    @AykutCevik
    Author

    @strugee as I said in point 3:
    via the share menu from gallery app
    This was the approach for all of the apps. The gallery app is stock, yes.

  9. tobiasKaminsky commented on Jul 1, 2020

    @tobiasKaminsky
    Member

    NC is not changing any metadata.
    You should easily find the causing app via uploading with different apps.
    If you can really reproduce it via NC please re-open.

  10. AykutCevik commented on May 10, 2022

    @AykutCevik
    Author

    Sorry, but I have to reopen this. It is still an issue, if I share a picture through the gallery or files app, nextcloud removes/nulls the GPS data all the time:
    grafik

    I tested this on a OnePlus 6T with Android 11 as well as on Samsung S21 Ultra with Android 12. On Samsung, I was even able to tick a checkbox prior sharing to keep the GPS data. Nextcloud itself removes them unfortunately.

  11. AykutCevik commented on May 31, 2022

    @AykutCevik
    Author

    @tobiasKaminsky can we reopen this issue please? It prevents me from uploading images through gallery apps which is way more convenient than doing it through the Nextcloud app.

  12. 72 remaining items

  13. Defenso-QTH commented on Jan 16, 2025

    @Defenso-QTH

    Since we cannot control Google's policies on the Play Store, I think the best workaround would be:

    • Checking and displaying a warning on every upload if the app cannot read GPS info. (Warning that could be silenced in settings for users who do not care.)
    • Enabling users to easily re-upload media that does not GPS info easily - or transfer only that information to update the files on the NextCloud remote.

    Moving to Immich is not currently an acceptable solution for FreeBSD users like myself since they do not provide a raw installer, only a docker-based setup, which is not currently supported under FreeBSD.

  14. Ra72xx commented on Jan 16, 2025

    @Ra72xx

    As I see it the problem also occurs when using the Nextcloud app's auto upload feature. At least that was the reason I discovered this bug report.
    While I have some understanding that "sharing" does some stuff to the pictures according to the demands of the recipient service, "uploading" for me implies exact 1:1 copies, everything else is nothing else but data loss.
    So is it possible that the Nextcloud app uses the wrong Android mechanism for its uploading? Standard WebDAV e. g. should never ever mess with the content it transports.

  15. vb0 commented on Jan 16, 2025

    @vb0

    No, this is not the problem, the OS is presenting a zeroed out file to NC. It doesn't matter what it does with it afterwards, the damage is done.

  16. Ra72xx commented on Jan 16, 2025

    @Ra72xx

    Really? This would be deliberately destroying a file, which is IMHO unacceptable. This doesn't happen when copying the pictures as files with other options, e. g. FolderSync or any file explorer (at least I hope so). So I assumed that the Nextcloud app should simply access the pictures as files and not as media.

  17. vb0 commented on Jan 16, 2025

    @vb0

    Everyone is in the same boat, hanging for dear life on the discussed permission. Sure, a file manager might have a lower chance to have it randomly yanked, doubly so if it's the default OS file manager, but there's nothing fundamentally different.

  18. andreaskoelsch commented on Feb 10, 2025

    @andreaskoelsch
  19. cooper2k4 commented on Mar 21, 2025

    @cooper2k4

    As far as I can see, the problem seems to be fixed now. A message appeared saying that I needed to check and grant full access permission, which I couldn't do, but it still works.

    Nextcloud Android App 3.31.0 (from Google Play Store) on Pixel 7a

  20. andreaskoelsch commented on Mar 21, 2025

    @andreaskoelsch

    @cooper2k4 did you download the app from Play store or f-droid,

  21. cooper2k4 commented on Mar 21, 2025

    @cooper2k4

    @cooper2k4 did you download the app from Play store or f-droid,

    It is installed from Google Play Store.

  22. AykutCevik commented on Mar 21, 2025

    @AykutCevik
    Author

    I can confirm that it works now on Android with version 3.31.0.

  23. matezoltanfarkas commented on Aug 21, 2025

    @matezoltanfarkas

    I was having the same issue on my Pixel 8 Pro.
    Downloading the F-Droid version fixed my issue.
    weird indeed

  24. IT-Bob commented on Sep 2, 2026

    @IT-Bob

    I've had the same problem for a few months now; I first noticed this issue in June 2026, both with auto-upload and manual uploads. I didn't have this problem before, and now I'm losing my location data.
    I have a Pixel 7, on GrapheneOS (Android 16 then Android 17), Nextcloud from F-Droid.

  25. IT-Bob commented on Sep 3, 2026

    @IT-Bob

    It seems the problem isn't actually related to Nextcloud after all. The only way I've found to preserve the GPS data is to connect my phone to my computer and copy the files. I lose this EXIF data if:

    • I send the files via Nextcloud (even the F-Droid version);
    • I copy them to an external hard drive connected to my phone;
    • I copy them via File Explorer to Nextcloud (WebDAV) or via the DAVx5 WebDAV mount;
    • I send the photos via KDEConnect.
  26. vb0 commented on Sep 3, 2026

    @vb0

    @IT-Bob you are using an app for all the examples below, and the app doesn't have the "all files" permission mentioned multiple times in this long issue, for example like here: #6248 (comment)

    "copy them to an external hard drive connected to my phone" is a bit weird if using the default file manager, as I'd guess it will get the permission to manage your files ... but nobody knows nowadays. Unfortunately this is a very "shifty" permission, that goes away sometimes randomly, or can't even be enabled, all depending on countless factors like the phone's manufacturer special tweaks, Android version, app version, where it's coming from (Play Store/F-Droid/etc.) and so on. It's kind of an ongoing battle just to be able to get your complete files from your own phone. The (few) ones that you can actually see in the regular shared storage, like the most basic camera pictures.

    There are multiple ways to get the files via computer, like MTP, adb pull, probably Link to Windows. I'd say adb pull is most likely the safest for now.

  27. IT-Bob commented on Sep 3, 2026

    @IT-Bob

    @vb0 Thanks, I missed those comments because they were hidden...
    I had just granted the missing permissions Photos and videos (I think it is this one, because KDEConnect do not have this option at all) and Nearby devices and it works.

    https://community.e.foundation/t/preserving-exif-data-when-exporting-pictures/68434/2

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    approvedbugfeature: app-to-app sharingAndroid intent/share-sheet integration for importing from or exporting to other apps.hotspot: device storageStorage (on-device) related. Permissions, paths, inconsistencies, etc.hotspot: metadataMetadata (EXIF, GPS, etc.)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions