Created
August 23, 2015 12:17
-
-
Save arkangelx/734727a32964d42a0b13 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//called in application onCreate | |
public Cloudinary initCloudinary() { | |
Map config = new HashMap(); | |
config.put("cloud_name", getString(R.string.cloudinary_name)); | |
config.put("api_key", getString(R.string.cloudinary_key)); | |
config.put("api_secret", getString(R.string.cloudinary_secret)); | |
return new Cloudinary(config); | |
} | |
setCloudinaryInstance(initCloudinary()); | |
public static void setCloudinaryInstance(Cloudinary cloudinaryInstance) { | |
Application.cloudinaryInstance = cloudinaryInstance; | |
} | |
//call to upload file | |
uploadResult= Application.cloudinaryInstance.uploader().upload(new File(path), ObjectUtils.emptyMap()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment