benawad / gello-world Goto Github PK
View Code? Open in Web Editor NEWCreate React App with GraphQL
Create React App with GraphQL
Hi, Nice Tutorial. I used cloudinary before in other meteor apps so was kinda familiar with that. Thanks for the Tutorial.
Now, I was following this to get things up and running in React native. I am using https://github.com/ivpusic/react-native-image-crop-picker to pick the image. Image picks up fine. gallery shows ok, I can console.log the result and i see data and uri of image and image updates but problem is I can't seem to upload it to cloudinary.
Here is my code for uploading the photo
_onPhotoPress = () => {
ImagePicker.openPicker({
width: 300,
height: 400,
cropping: true,
mediaType: 'photo'
})
.then(image => {
this.setState({ pic: image.sourceURL, file: image })
console.log(this.state)
console.log(image)
const formData = new FormData()
formData.append('file', this.state.file)
formData.append('upload_preset', 'XXXX')
return axios.post(
`https://api.cloudinary.com/v1_1/XXX`,
formData
)
})
.catch(err => {
console.log(`${err}`)
})
}
Thanks in Advance. Creating a react native-cloudinary-GQL image upload tutorial would be nice.
could you explain how to checkauth cookies http only based
I see here that you still using localstorage instread of coookie ?
https://github.com/benawad/gello-world/blob/8_cookies/src/routes/index.js#L11
thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.