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

[HOLD for payment 2022-05-20][$500] Some image and video downloads do not get stored in Photo Gallery in iOS - Reported by @mananjadhav #7307

Closed
mvtglobally opened this issue Jan 19, 2022 · 65 comments
Assignees
Labels
Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor Waiting for copy User facing verbiage needs polishing

Comments

@mvtglobally
Copy link

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Open app.
  2. Send specific image to chat (link below)
  3. Download this image from another chat

Expected Result:

Images should go to Photo gallery on IOS

Actual Result:

Some specific images go to Files instead of photo gallery. Issue is not repro with all the images

Workaround:

unknown

Platform:

Where is this issue occurring?

  • iOS

Version Number: 1.1.30-0
Reproducible in staging?: Y
Reproducible in production?: Y
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
book
image-001

download-attachment.MP4

IMG_6755

Expensify/Expensify Issue URL:
Issue reported by: @mananjadhav
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1642005135378900

View all open jobs on GitHub

@MelvinBot
Copy link

Triggered auto assignment to @aldo-expensify (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@aldo-expensify
Copy link
Contributor

I don't have an IPhone to reproduce this locally, but the issue looks well described.

@aldo-expensify aldo-expensify added Weekly KSv2 External Added to denote the issue can be worked on by a contributor and removed Daily KSv2 labels Jan 19, 2022
@MelvinBot
Copy link

Triggered auto assignment to @jliexpensify (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

@jliexpensify
Copy link
Contributor

@MelvinBot
Copy link

Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane (Exported)

@MelvinBot MelvinBot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 20, 2022
@MelvinBot
Copy link

Triggered auto assignment to @thienlnam (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@wenge8n
Copy link
Contributor

wenge8n commented Jan 20, 2022

This issue is an expected behavior because rn-fetch-blob doesn't save file in photo library by default in iOS.
Currently we download file into dirs.DocumentDir folder in iOS and the file will be saved in the app's sandbox storage (documentDirectory).

Proposal

After download file(image/video) in iOS, we need to copy/move file to photo library by manually.
For image/video, we can download them into cache directory dirs.CacheDir if you don't want duplication. For more info
We can copy the image/video into photo library using react-native-cameraroll

So the steps are

  1. Download file into document or cache directory
  2. Copy file into photo library

This is only for image/video in iOS. For other cases, we will stay on the current logic.

@rushatgabhane
Copy link
Member

rushatgabhane commented Jan 20, 2022

because rn-fetch-blob doesn't save file in photo library by default in iOS.

@wenge8n hmm, from the slack thread - we can save most to photo library in iOS except the likes of images in the issue.

The solution you're proposing looks like a workaround. I'd prefer if we find and fix the root cause.
What do you think?

@wenge8n
Copy link
Contributor

wenge8n commented Jan 20, 2022

I don't have access to the slack channel so I sent request to join slack and am waiting now.

we can save most to photo library in iOS except the likes of images in the issue

Hmm.. so you mean it works sometimes and it doesn't work sometimes?
I tested it and the files are always saved in the document directory. They never saved in the photo library.
Because as I said rn-fetch-blob doesn't support such functionality.

@rushatgabhane
Copy link
Member

rushatgabhane commented Jan 20, 2022

so you mean it works sometimes and it doesn't work sometimes

Yep

I tested it and the files are always saved in the document directory. They never saved in the photo library. Because as I said rn-fetch-blob doesn't support such functionality.

Okay, the issue reporter also faced the same thing; all photos stored in document. Whilst others can save photos to their gallery except the ones mentioned in this issue.

@robert-go
Copy link

Hi, I'm from Upwork
I'm on the main branch, am I on the right branch?
Because it save the image to Document only
I can't save images on my iPhone
I also don't see the app asking for any permission to save the photo
Screen Shot 2022-01-21 at 20 14 32

@rushatgabhane
Copy link
Member

rushatgabhane commented Jan 21, 2022

Hey @robert-go, yes you're on the right branch.

From slack - "I'm on v1.1.26-1 on iOS app, downloaded a .png file and it went to photo gallery. "
"Can confirm that when I downloaded those two images (attached in the issue) they went to files and not photo gallery, not sure why"

Likewise for me, images are saved to gallery. But the ones mentioned in the issue are saved to documents 😵

@mananjadhav
Copy link
Collaborator

@thienlnam PR updated.

@ryanldonato ryanldonato removed their assignment May 3, 2022
@melvin-bot melvin-bot bot added the Overdue label May 4, 2022
@thienlnam
Copy link
Contributor

Just merged, now waiting for deploys and regression tests

@melvin-bot melvin-bot bot removed the Overdue label May 4, 2022
@dylanexpensify
Copy link
Contributor

I'm heading on parental leave so reassigning! Thank you to whoever gets assigned this! ❤️

@dylanexpensify dylanexpensify removed their assignment May 6, 2022
@dylanexpensify dylanexpensify added External Added to denote the issue can be worked on by a contributor and removed External Added to denote the issue can be worked on by a contributor labels May 6, 2022
@melvin-bot
Copy link

melvin-bot bot commented May 6, 2022

Triggered auto assignment to @JmillsExpensify (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

@melvin-bot melvin-bot bot added the Overdue label May 9, 2022
@thienlnam
Copy link
Contributor

Same as above, waiting for deploy and production wait

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels May 9, 2022
@thienlnam
Copy link
Contributor

Same as above, just recently deployed to staging - latest deploy updates here

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels May 12, 2022
@mananjadhav
Copy link
Collaborator

@thienlnam @JmillsExpensify This went to production 3 days back, but the payment date wasn't updated.

@melvin-bot melvin-bot bot removed the Overdue label May 16, 2022
@thienlnam thienlnam changed the title [$500] Some image and video downloads do not get stored in Photo Gallery in iOS - Reported by @mananjadhav [HOLD for payment 2022-05-20][$500] Some image and video downloads do not get stored in Photo Gallery in iOS - Reported by @mananjadhav May 16, 2022
@JmillsExpensify
Copy link

JmillsExpensify commented May 17, 2022

Cool, thanks for the heads up. Checking the linked PR and then I'll update the issue title. Actually nevermind, @thienlnam already got it!

@melvin-bot melvin-bot bot added the Overdue label May 19, 2022
@mananjadhav
Copy link
Collaborator

@JmillsExpensify Bump on Upwork. Here I am the reporter and the contributor both.

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels May 20, 2022
@JmillsExpensify
Copy link

Thanks! I'm jumping over to Upwork now to issue payment and close this one out for everyone.

@melvin-bot melvin-bot bot removed the Overdue label May 23, 2022
@JmillsExpensify
Copy link

Payments processed for @mananjadhav (reporting and PR), as well as @parasharrajat (C+). Closing the issue. Please comment in this issue with any further questions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor Waiting for copy User facing verbiage needs polishing
Projects
None yet
Development

No branches or pull requests