You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that when there are different photos that share the identical file name, only one of them is uploaded during camera uploads (on iOS).
I can reliably reproduce photos being ignored if I place a file with the same file name into the camera upload directory in my Filen drive:
Steps to reproduce
Snap a photo
Check the photo's file name in the photos app
Create a random file of arbitrary size and modification date but with the same name in the Filen drive in the destination of camera uploads (or a random sub-directory within)
Trigger camera uploads in the Filen app on the phone
Photo is not uploaded
Triggering "Reset uploaded assets" and waiting has no effect. As soon as the dummy file is removed, however, the upload works.
Repeat, but do not create file with the same name in the camera uploads directory
Trigger camera uploads
Photo is uploaded
To clarify: The event logs of the Filen account do no not list the attempt to upload, i.e. the photo does not replace the existing one, but is just completely skipped. This leads me to believe that something might be wrong in the delta-checking logic.
Why is this important?
For iOS, the file name of photos iterates from IMG_0000.heic to IMG_9999.heic. When reaching 10,000, the increment is reset and new photos are AFAIK placed in a different (internal) directory (≠ album) restarting from IMG_0000.heic. This results in photos with identical file names in the photo gallery.
So, this is an actual real-life problem; I have currently around 50,000 photos on my phone. Only a fraction of them is uploaded. I have no feasible way of finding which files are uploaded and which are skipped.
Source code
The relevant parts in the source code seem to be the lines shown below. From what I could gather, it should handle the case where two photos share the same file name by checking modification times(?) and file size(?) as well. But I couldn't find what happens if they don't match, i.e. is the second file then still uploaded but with a different file name?
Alternatively I wonder, if the modification time is not reported correctly from iOS photos or something else slips through the if-conditions (e.g. the setting of "Save all assets").
in getDeltas = async (local: CameraUploadItems, remote: CameraUploadItems)
I recently got a new iPhone and this problem also happens for me. Older photos from iCloud are automatically renamed when they are downloaded to my iPhone (from the Photos app) and new photos I took start with IMG_0000.heic again. This results in some images not uploading to Filen (as photos with the same file name already exist in the drive).
I noticed that when there are different photos that share the identical file name, only one of them is uploaded during camera uploads (on iOS).
I can reliably reproduce photos being ignored if I place a file with the same file name into the camera upload directory in my Filen drive:
Steps to reproduce
Triggering "Reset uploaded assets" and waiting has no effect. As soon as the dummy file is removed, however, the upload works.
To clarify: The event logs of the Filen account do no not list the attempt to upload, i.e. the photo does not replace the existing one, but is just completely skipped. This leads me to believe that something might be wrong in the delta-checking logic.
Why is this important?
For iOS, the file name of photos iterates from IMG_0000.heic to IMG_9999.heic. When reaching 10,000, the increment is reset and new photos are AFAIK placed in a different (internal) directory (≠ album) restarting from IMG_0000.heic. This results in photos with identical file names in the photo gallery.
So, this is an actual real-life problem; I have currently around 50,000 photos on my phone. Only a fraction of them is uploaded. I have no feasible way of finding which files are uploaded and which are skipped.
Source code
The relevant parts in the source code seem to be the lines shown below. From what I could gather, it should handle the case where two photos share the same file name by checking modification times(?) and file size(?) as well. But I couldn't find what happens if they don't match, i.e. is the second file then still uploaded but with a different file name?
Alternatively I wonder, if the modification time is not reported correctly from iOS photos or something else slips through the if-conditions (e.g. the setting of "Save all assets").
in
getDeltas = async (local: CameraUploadItems, remote: CameraUploadItems)
filen-mobile/src/lib/services/cameraUpload/cameraUpload.ts
Lines 359 to 390 in 0b70ca2
and
in
upload = async (delta: Delta): Promise<void>
filen-mobile/src/lib/services/cameraUpload/cameraUpload.ts
Lines 898 to 943 in 0b70ca2
Debug output / log
Is there a way to enable debugging logs in the mobile app to inspect what might be going on?
I am willing to help to debug this - it's just difficult without any logs.
The text was updated successfully, but these errors were encountered: