question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android email share name has extension .null

See original GitHub issue

This works with IOS but with Android 7 ( Huawei ) the file attached is like 1501167383416.null.

… share = (uri) => { RNFetchBlob.fs.readFile(uri, ‘base64’) .then((data) => { let shareOptions = { title: “React Native Share Example”, message: “Check out this photo!”, type: “image/jpg”, url: data:image/jpg;base64,${data}, subject: “Check out this photo!” }

    Share.open(shareOptions)
      .catch(err => console.log('err', err))
  })

} …

Any idea?

best regards, Lorenzo

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:13 (3 by maintainers)

github_iconTop GitHub Comments

23reactions
alexdunnecommented, Apr 27, 2018

If you want to send a jpg you should use image/jpeg rather than image/jpg

data:image/jpeg;base64,${data}

18reactions
Daanozcommented, May 20, 2018

Ran into the same issue with CSV, internally the code uses the Android build-in MimeUtils to convert the mime-type to an extension.

Just use the below list as a reference 👍
https://android.googlesource.com/platform/libcore/+/933e699897a15cc61e5641e6365f09f24e22b247/luni/src/main/java/libcore/net/MimeUtils.java

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android email share name has extension .null #145 - GitHub
This works with IOS but with Android 7 ( Huawei ) the file attached is like 1501167383416.null. ... share = (uri) => {...
Read more >
Android Share custom file - Stack Overflow
If I choose an Email-app like Gmail to share my file it works how it should. The email includes the file as filename.oli...
Read more >
How to open NULL file extension on Windows, Android or online
Are you seeking a simple solution of HOW TO OPEN A NULL FILE on Windows, Android, or online? Check out this post for...
Read more >
Authenticate with Firebase Using Email Link in Android
You can use Firebase Authentication to sign in a user by sending them an email containing a link, which they can click to...
Read more >
How to open NULL file extension on ... - InfoGuide Nigeria
Read through this post to see the various ways to open NULL file extension on Windows, Android, or online without stress.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found