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
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 .
@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.
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.
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.
@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).
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
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.
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
Once both of those are done and the document picker lib supports web and includes both an image and file picker, we remove the Image Picker lib and replace it with the updated document picker lib
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.
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.
Activity
quinthar commentedon Aug 15, 2020
dupe, closing
quinthar commentedon Aug 15, 2020
Oh actually this is different -- this is saying adding images; that's not super important, but displaying images is.
mallenexpensify commentedon Aug 31, 2020
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 .3 remaining items
mallenexpensify commentedon Sep 2, 2020
@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 Expensifylink, it takes you to the report page on Expensify.com where you can click the paper clip on the right of thecompose textbox 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.Jag96 commentedon Sep 3, 2020
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.
mallenexpensify commentedon Sep 3, 2020
Linking this one too.. since it might be related and great to look into after
Make image quality higher #353#353
Jag96 commentedon Sep 5, 2020
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.
AndrewGable commentedon Sep 9, 2020
Link PR was merged: #399
quinthar commentedon Sep 11, 2020
@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).
quinthar commentedon Sep 11, 2020
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
Jag96 commentedon Sep 11, 2020
Sorry for the miscommunication, let me clarify the points individually
a solution that works right now everywhere but iOSUIDocumentPickerViewController, which doesn't open the gallery. There is a feature-request issue open to add this functionality hereTherefore, for this fix
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.
quinthar commentedon Sep 15, 2020
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.
mallenexpensify commentedon Sep 16, 2020
If anyone ends up working on hiring Upwork contractors, I'd like to be included on the process if possible.
quinthar commentedon Sep 18, 2020