Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to upload images to cloudinary

 // const file = e.target.files[0]
 
 const uploadFile = async function () {
    const data = new FormData()
    data.append('file', file)
    data.append("upload_preset", 'images')
    const res = await axios.post('https://api.cloudinary.com/v1_1/dd6prnkef/image/upload', data)
    console.log(res.data.secure_url)
  }
 
PREVIOUS NEXT
Tagged: #upload #images #cloudinary
ADD COMMENT
Topic
Name
6+7 =