Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IOS] Duplicate Filenames When Sharing from WhatsApp #322

Open
Harshil-d opened this issue Sep 3, 2024 · 0 comments · May be fixed by #323
Open

[IOS] Duplicate Filenames When Sharing from WhatsApp #322

Harshil-d opened this issue Sep 3, 2024 · 0 comments · May be fixed by #323

Comments

@Harshil-d
Copy link

Issue

When sharing multiple files from WhatsApp to our iOS app, some files are received with identical names. This results in fewer files appearing in our app than were originally shared.

Expected Behavior

Each shared file should have a unique name, allowing our app to process and display all files shared from WhatsApp.

Current Behavior

Multiple files shared from WhatsApp sometimes have the same filename, causing our app to overwrite or ignore some files.

IMPORTANT: The problem is most noticeable with photos taken in quick succession, where the timestamp in the filename doesn't include milliseconds.

Example of received files:

AppGroup/F1237D67-4852-45A1-B4FC-67B90A51FBC5/PHOTO-2024-08-20-14-39-52.jpg
AppGroup/F1237D67-4852-45A1-B4FC-67B90A51FBC5/PHOTO-2024-08-20-14-39-53.jpg
AppGroup/F1237D67-4852-45A1-B4FC-67B90A51FBC5/PHOTO-2024-08-20-14-39-53.jpg
AppGroup/F1237D67-4852-45A1-B4FC-67B90A51FBC5/PHOTO-2024-08-20-14-39-54.jpg
AppGroup/F1237D67-4852-45A1-B4FC-67B90A51FBC5/PHOTO-2024-08-20-14-39-54.jpg
AppGroup/F1237D67-4852-45A1-B4FC-67B90A51FBC5/PHOTO-2024-08-20-14-39-55.jpg

In this example, the files with timestamps 14-39-53 and 14-39-54 are duplicated, resulting in only 4 unique filenames instead of the 6 files actually shared.

Steps to Reproduce

  1. Open WhatsApp on iOS
  2. Select multiple photos taken in quick succession (within the same second)
  3. Share these photos to our app
  4. Observe the number of files received in our app
  5. Check the filenames of the received files

Additional Information

  • This issue is specific to WhatsApp sharing on iOS
  • Other sharing sources (e.g., Photos app) do not exhibit this problem
  • The root cause appears to be the lack of millisecond precision in the timestamp used for filenames
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant