martin
06/16/2017, 7:36 PM"returnValue":{"rawResponse":{}}}
Might anyone know why?
Code:
const cloudinary = require('cloudinary@1.2.1')
module.exports = function (event) {
cloudinary.config({
cloud_name: '___CLOUD_NAME___',
api_key: '___API_KEY___,
api_secret: '___API_SECRET___'
})
console.log('Received event')
cloudinary.uploader.upload(event.data.UserAvatar.node.file.url, (result) => {
console.log(result)
})
}
Referring to console.log(result)
at end. cloudinary
receives images alright. But I don’t seem to be receiving a response. And inserting return result
also doesn’t appear to work.nilan
06/16/2017, 8:13 PMcloudinary.uploader.upload
uses. Graphcool Functions don't support callbacks, only promises: https://www.graph.cool/docs/reference/functions/overview-boo6uteemo/#current-limitationsmartin
06/16/2017, 8:14 PMnilan
06/16/2017, 8:14 PMmartin
06/16/2017, 8:14 PMmartin
06/16/2017, 8:14 PMnilan
06/16/2017, 8:16 PMnilan
06/16/2017, 8:19 PMmartin
06/16/2017, 8:24 PMnilan
06/16/2017, 8:33 PMnilan
06/16/2017, 8:33 PMmartin
06/16/2017, 8:33 PMnilan
06/16/2017, 8:33 PMnilan
06/16/2017, 8:34 PMmartin
06/16/2017, 8:34 PMmartin
06/16/2017, 8:39 PMnilan
06/16/2017, 8:42 PM