{"action":"created","issue":{"url":"https://api.github.com/repos/react-native-community/react-native-share/issues/520","repository_url":"https://api.github.com/repos/react-native-community/react-native-share","labels_url":"https://api.github.com/repos/react-native-community/react-native-share/issues/520/labels{/name}","comments_url":"https://api.github.com/repos/react-native-community/react-native-share/issues/520/comments","events_url":"https://api.github.com/repos/react-native-community/react-native-share/issues/520/events","html_url":"https://github.com/react-native-community/react-native-share/issues/520","id":454108190,"node_id":"MDU6SXNzdWU0NTQxMDgxOTA=","number":520,"title":"[Android] Unable to share files - \"Request contained no data\"","user":{"login":"Cnordbo","id":385693,"node_id":"MDQ6VXNlcjM4NTY5Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/385693?v=4","gravatar_id":"","url":"https://api.github.com/users/Cnordbo","html_url":"https://github.com/Cnordbo","followers_url":"https://api.github.com/users/Cnordbo/followers","following_url":"https://api.github.com/users/Cnordbo/following{/other_user}","gists_url":"https://api.github.com/users/Cnordbo/gists{/gist_id}","starred_url":"https://api.github.com/users/Cnordbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cnordbo/subscriptions","organizations_url":"https://api.github.com/users/Cnordbo/orgs","repos_url":"https://api.github.com/users/Cnordbo/repos","events_url":"https://api.github.com/users/Cnordbo/events{/privacy}","received_events_url":"https://api.github.com/users/Cnordbo/received_events","type":"User","site_admin":false},"labels":[{"id":266963794,"node_id":"MDU6TGFiZWwyNjY5NjM3OTQ=","url":"https://api.github.com/repos/react-native-community/react-native-share/labels/bug","name":"bug","color":"fc2929","default":true},{"id":266963797,"node_id":"MDU6TGFiZWwyNjY5NjM3OTc=","url":"https://api.github.com/repos/react-native-community/react-native-share/labels/help%20wanted","name":"help wanted","color":"159818","default":true},{"id":920836090,"node_id":"MDU6TGFiZWw5MjA4MzYwOTA=","url":"https://api.github.com/repos/react-native-community/react-native-share/labels/os:%20android","name":"os: android","color":"bfd4f2","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2019-06-10T10:43:08Z","updated_at":"2019-09-16T12:41:52Z","closed_at":null,"author_association":"NONE","body":"### Steps to reproduce\r\n1. Create file using react-native-fs (.csv)\r\n2. Use the path from react-native-fs as the url (`file:// + $path`)\r\n3. `Share.open({url: pathWithFilePrefix, title: \"MyData.csv\"})`\r\n4. Share to Google Disk\r\n\r\n### Expected behaviour\r\nFile to be exported/uploaded\r\n\r\n### Actual behaviour\r\n![image](https://user-images.githubusercontent.com/385693/59188985-3b144a80-8b79-11e9-99ed-9564caf1d1e2.png)\r\n\r\n\r\n### Environment\r\n- **React Native version**: 0.59.9\r\n- **React Native platform + platform version**: Android 9? (Api 28)\r\n\r\n### react-native-share\r\n**Version**: 1.2.1\r\n\r\nFull code: \r\n```js\r\nexportCsv = async () => {\r\n    let data = this.getCsvData();\r\n    var path = RNFS.DocumentDirectoryPath + \"/MyData.csv\"; \r\n\r\n    // path = \"/data/user/0/com.myApp/files/MyData.csv\"\r\n\r\n    try {\r\n      RNFS.writeFile(path, data, \"utf8\");\r\n    } catch (err) {\r\n      Alert.alert(\"Export failed\", \"Failed to write file to disk\");\r\n      return;\r\n    }\r\n\r\n    try {\r\n      let editedPath = \"file://\" + path;\r\n      await Share.open({\r\n        url: editedPath,\r\n        type: \"text/csv\",\r\n        title: \"MyData.csv\"\r\n      });\r\n    } catch (err) {\r\n      // Fall trough\r\n    }\r\n\r\n    try {\r\n      await RNFS.unlink(path);\r\n    } catch (err) {\r\n      console.log(\"Unable to delete locally stored file\", err);\r\n    }\r\n  };\r\n```"},"comment":{"url":"https://api.github.com/repos/react-native-community/react-native-share/issues/comments/531759795","html_url":"https://github.com/react-native-community/react-native-share/issues/520#issuecomment-531759795","issue_url":"https://api.github.com/repos/react-native-community/react-native-share/issues/520","id":531759795,"node_id":"MDEyOklzc3VlQ29tbWVudDUzMTc1OTc5NQ==","user":{"login":"jgcmarins","id":5133450,"node_id":"MDQ6VXNlcjUxMzM0NTA=","avatar_url":"https://avatars1.githubusercontent.com/u/5133450?v=4","gravatar_id":"","url":"https://api.github.com/users/jgcmarins","html_url":"https://github.com/jgcmarins","followers_url":"https://api.github.com/users/jgcmarins/followers","following_url":"https://api.github.com/users/jgcmarins/following{/other_user}","gists_url":"https://api.github.com/users/jgcmarins/gists{/gist_id}","starred_url":"https://api.github.com/users/jgcmarins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgcmarins/subscriptions","organizations_url":"https://api.github.com/users/jgcmarins/orgs","repos_url":"https://api.github.com/users/jgcmarins/repos","events_url":"https://api.github.com/users/jgcmarins/events{/privacy}","received_events_url":"https://api.github.com/users/jgcmarins/received_events","type":"User","site_admin":false},"created_at":"2019-09-16T12:41:52Z","updated_at":"2019-09-16T12:41:52Z","author_association":"MEMBER","body":"I don't think it's possible to share base64 using `file://` approach."}}
{"actor":{"display_login":"jgcmarins"}}