We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi All, I am trying to create a (expo) react native template using slush,
The code related to the above is:
render() { return ( <View style= {{flex:1}}> <WebView source={{uri:'<%= webURI%>'}} style={{ marginTop: 20 }} ref={( webView ) => this.webView = webView} onMessage={ (event)=>{ if(event.nativeEvent.data =="gallery!"){ console.log(event.nativeEvent.data) this._galleryImage()} if(event.nativeEvent.data =="camera!"){ console.log(event.nativeEvent.data) this._cameraImage()} }} /> </View> ) } _galleryImage = async () => { let pickerResult = await ImagePicker.launchImageLibraryAsync({ exif: true, allowsEditing: false, quality: 0.7, base64: true, }) if (pickerResult.cancelled) { return } console.log(pickerResult) } _cameraImage = async() =>{ let result = await ImagePicker.launchCameraAsync({ allowsEditing: true, aspect: [4, 3], }); if (result.cancelled) { return; } let localUri = result.uri; let filename = localUri.split('/').pop(); let match = /\.(\w+)$/.exec(filename); let type = match ? `image/${match[1]}` : `image`; let formData = new FormData(); formData.append('photo', { uri: localUri, name: filename, type }); console.log(formData); return await fetch(YOUR_SERVER_URL, { method: 'POST', body: formData, header: { 'content-type': 'multipart/form-data', }, }); } }
Thanks in advance, Slush article I referred: https://medium.com/@horte/how-to-create-a-slush-generator-part-1-eafece6c1ca8 please note that I won;t get such errors when I try generating reactjs webapps , Thanks in advance Naveen
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi All,
I am trying to create a (expo) react native template using slush,
Reference Error ^ match is not defined
The code related to the above is:
Thanks in advance, Slush article I referred: https://medium.com/@horte/how-to-create-a-slush-generator-part-1-eafece6c1ca8
please note that I won;t get such errors when I try generating reactjs webapps ,
Thanks in advance
Naveen
The text was updated successfully, but these errors were encountered: