- edited description
cloudinary doesn't work with Grails version 3.1.4
Issue #2
new
I am trying to upload image from Grails to Heroku platform. Heroku provides me the required credentials.
In build.gradle i have added
compile "org.grails.plugins:grails-cloudinary:0.3"
in application.yml
grails:
plugin:
cloudinary:
apiKey: '*****'
apiSecret: '*****'
cloudName: ')))))'
CLOUDINARY_URL: 'cloudinary://***:***@***'
in Controller
def cloudinaryService
MultipartFile imageFile = request.getFile('fileupload')
def imageResult = cloudinaryService.upload(imageFile.bytes)
With this code it gives me "java.lang.NullPointerException: Cannot invoke method upload() on null object" error. I have double check enctype="multipart/form-data" is set.
I think it is not getting cloudinaryService object properly. Can u please guide me to resolve this? Thank you.
Comments (3)
-
reporter -
reporter - edited description
-
reporter - edited description
- Log in to comment