Open chirag04 opened 9 years ago
@avishayil Happy to accept PR for this.
I sent a PR, please review, it's not perfect but it's working.
I need this too. Will this be implemented?
Any updates on this?
I made fork that supports multiple attachments for iOS.
I am in process of adding Android support for multiple attachments as well.
I also have HTML email for Android working but have not checked it in yet.
https://github.com/esutton/react-native-mail
I am happy to share work, however, I am not very fluent in git and may need assistance.
I need attachment support in android as well. Happy to assist in any git issues
@esutton happy to help. feel free to send PRs
I'm able to attach to Android just fine, but am having trouble attaching to iOS. I've submitted a question on stack overflow https://stackoverflow.com/questions/47086300/attach-image-to-email-in-react-native
But the fundamental issue seems to be that I'm getting back a uri
value that looks like this (doesn't work as the full path)...
file://var/mobile/Containers/Data/Application/983938D-5304-463C-BD05-D033E55F5BEB/Documents/images/224CA6DD-5299-48C3-A7CF-0B645004535F.jpg
Instead of something that looks like this
/Users/anton/Library/Developer/CoreSimulator/Devices/9A15F203-9A58-41C5-A4FC-EA25FAAE92BD/data/Containers/Data/Application/79FF93F9-BA89-4F4C-8809-277BEECD447D/Documents/EFFF0ECE-4063-4FE5-984E-E76506788350.jpg
which would apparently work. If anyone has a clue how to resolve this, I would appreciate it.
It works for me on both platforms. You may want to check my fork.
With react-native-image- picker?
On Nov 2, 2017 5:28 PM, "Ujwal Setlur" notifications@github.com wrote:
It works for me on both platforms. You may want to check my fork.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/chirag04/react-native-mail/issues/4#issuecomment-341596907, or mute the thread https://github.com/notifications/unsubscribe-auth/ABkHfkShZYFH2Nrj8f3rjd4R8eehcXhnks5syl4QgaJpZM4F9FRK .
Haven't tried it with that, thigh I use image pocket in another project. Should work though. If not, it is very likely some issue with leading /
Sorry image pocket.
Yeah I think the problem is with the way image picker Returns the path to
the asset on iOS. I'm getting a file://
based path instead of a / based
path
On Nov 2, 2017 6:05 PM, "Ujwal Setlur" notifications@github.com wrote:
Sorry image pocket.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/chirag04/react-native-mail/issues/4#issuecomment-341601336, or mute the thread https://github.com/notifications/unsubscribe-auth/ABkHfjOg7OCc3IVP1dzoOoWQYz8EkHSfks5symbbgaJpZM4F9FRK .
Are you it's not the other way around? I am not quite sure. In my other project where I use image-picker, I had to do this:
// Construct 'file://' URI if we have a raw path
if (imagePath.startsWith("/")) {
imagePath = "file:/" + image.path;
}
I'm pretty sure, unless I'm a complete bonehead. I always get back a file://
based uri
I've updated my stackoverflow question with logs to prove it. I provided a dump of the actual xcode logs. Here's the part I think you'd be most interested in...
2017-11-02 20:13:00.827 [info][tid:com.facebook.react.JavaScript] 'Response = ', { fileSize: 508257,
data: REMOVED_BASE64_STRING
timestamp: '2017-10-25T02:51:35Z',
uri: 'file:///var/mobile/Containers/Data/Application/144D1C48-C6D5-475A-891A-F75360CD64E2/Documents/images/0EF09235-6E04-4799-86F5-3E996ED4E439.jpg',
origURL: 'assets-library://asset/asset.JPG?id=EF345E7A-2DF1-49CA-875D-4208976A635B&ext=JPG',
isVertical: false,
height: 768,
width: 1024,
fileName: 'IMG_0003.JPG' }
Interesting. The mail component should have worked then I think. Will run some tests tomorrow.
I'd really, super appreciate that.
+1
It's working fine in the iOS mobile. But not working in the Android Mobile.
Please help someone else not working ios
Any progress with that?