Skip to content

Add image attachments #87

Closed
Closed

Description

@quinthar

This would make it an amazing demo, but I don't think anyone expects it out of the gate.

Activity

  1. modified the milestone: on Aug 12, 2020
  2. quinthar commented on Aug 15, 2020

    @quinthar
    ContributorAuthor

    dupe, closing

  3. quinthar commented on Aug 15, 2020

    @quinthar
    ContributorAuthor

    Oh actually this is different -- this is saying adding images; that's not super important, but displaying images is.

  4. mallenexpensify commented on Aug 31, 2020

    @mallenexpensify
    Contributor

    Scrolling through my DMs, I add images/screenshot ALL the time. Bumping this to HIGH, adding to milestone and dropping another note in #deprecate-slack .

  5. 3 remaining items

  6. mallenexpensify commented on Sep 2, 2020

    @mallenexpensify
    Contributor

    @ryanschaffer and I were chatting and testing earlier...
    When you get an email about a chat and you click the To respond, head over to Expensify link, it takes you to the report page on Expensify.com where you can click the paper clip on the right of the compose text box to upload an attachment. Ryan had the idea, as a quick fix, might it be possible to include a link from Chat to the report page where people can easily upload attachments? I think this is a solid quick-ish fix for PoC.

  7. self-assigned this
    on Sep 2, 2020
  8. Jag96 commented on Sep 3, 2020

    @Jag96
    Contributor

    might it be possible to include a link from Chat to the report page where people can easily upload attachments

    This sounds easier than adding a new library, I can add that work around first so people have some way to upload attachments and then get an image/document picker working once that is in place.

    In terms of a library, I think this library is our best bet, it adds web support to a popular RN document picker but is a bit outdated. This supports picking documents as well as images.

    This alternative library adds web support to a popular image picker that just handles picking images, but hasn't been updated in a few years and requires expo, which I think is overkill for this.

  9. mallenexpensify commented on Sep 3, 2020

    @mallenexpensify
    Contributor

    Linking this one too.. since it might be related and great to look into after
    Make image quality higher #353
    #353

  10. Jag96 commented on Sep 5, 2020

    @Jag96
    Contributor

    The PR with the temp fix is in review, for the real fix I've got a local branch working for basic web uploads using a shim web implementation of this library (which lacks web support), since the document picker library doesn't allow the user to open the gallery on mobile. There's an issue on the current version of RN causing local image uploads to fail, so I'll have a look at the potential fixes posted there next week: react/react-native#29364.

  11. AndrewGable commented on Sep 9, 2020

    @AndrewGable
    Contributor

    Link PR was merged: #399

  12. quinthar commented on Sep 11, 2020

    @quinthar
    ContributorAuthor

    @Jag96 - I didn't quite follow your statement: are you saying that there is a library designed to do precisely what we want, but it has a bug that causes it to not pull from the gallery on iPhone? And to work around that bug you created a new library? If so, I'd suggest not creating the new throwaway library, and instead we just try to get the "real" library's bug fixed (either by fixing it ourselves, or by hiring someone to do it).

  13. quinthar commented on Sep 11, 2020

    @quinthar
    ContributorAuthor

    Additionally, if we have a solution that works right now everywhere but iOS, I think we should just use the "real" solution, and not do the link to E.com

  14. Jag96 commented on Sep 11, 2020

    @Jag96
    Contributor

    Sorry for the miscommunication, let me clarify the points individually

    • I have not found a library that works for web and mobile out of the box, and there currently isn't a solution that works right now everywhere but iOS
    • The outdated library I mentioned in Add image attachments #87 (comment) (Let's call this Library A) did work on web, but was outdated over a year from the initial fork for iOS/Android, is no longer maintained, and didn't work on iOS/Android, so it didn't make sense to me to try to submit PRs there to fix bugs.
    • The document picker library (the library that Library A forked off of, which does not have web support) does not allow you to pull images from the gallery on iOS, but works for images and files on Android. There are a few issues in that repo that ask how to choose images from the iOS gallery, but there are no answers outside of using a different library to pick images on iOS. It does not appear to be a bug, since this library is just a wrapper of UIDocumentPickerViewController, which doesn't open the gallery. There is a feature-request issue open to add this functionality here
    • The image picker library that I'm using now (which does not have web support) allows you to pick images from the gallery on iOS/Android, but does not have support for picking files.
    • React Native v63.0 has an issue where you can't upload local images. The PR for that is here, but its sitting in review. I've made a local change to one of the RN files to test as I go, but if that fix isn't merged when my PR is done we'll need to fix it another way in the meantime by adding a post-install script or downgrading the RN version temporarily.

    Therefore, for this fix

    • I'm using the Image Picker library that supports image uploads on iOS/Android
    • I'm adding a shim lib to web that allows for image and document uploads, since none of these libs support web.

    If we wanted to make PRs that add web support and both gallery/file picking so that we only have to use one library for everything, the next steps would be

    If we wanted support for both gallery/file picking on ios/android without having to use just one library, we could add both the document-picker library and the image-picker library and implement something like this.

  15. quinthar commented on Sep 15, 2020

    @quinthar
    ContributorAuthor

    I think it could be cool to hire some Upwork contractor to try to shepherd these changes into the RN mainline branch. It would be good to figure out how hard that is in practice to do, and start building a name for ourselves.

  16. mallenexpensify commented on Sep 16, 2020

    @mallenexpensify
    Contributor

    If anyone ends up working on hiring Upwork contractors, I'd like to be included on the process if possible.

  17. quinthar commented on Sep 18, 2020

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

Metadata

Metadata

Assignees

Labels

ReviewingHas a PR in review

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions