I have generated a PDF from itextpdf
, now I want to upload this PDF file to "cloudinary" and save the link of uploaded portable document file in database. I can use both jquery and java for this purpose. I think that "cloudinary" returns json data and link can be taken from this json data?
Asked
Active
Viewed 1,381 times
0

Marko Popovic
- 3,999
- 3
- 22
- 37

shubham
- 1
- 3
-
Have you looked at this?: http://cloudinary.com/documentation/upload_images#uploading_with_a_direct_call_to_the_api – Drazen Bjelovuk Feb 01 '16 at 10:41
-
this documentary is for uploading image – shubham Feb 01 '16 at 11:10
-
pdf files can be uploaded to Cloudinary as images. – Tal Lev-Ami Feb 01 '16 at 19:37
1 Answers
0
Using Cloudinary's Java library, something like this should be what you're looking for:
import com.cloudinary.Cloudinary;
Cloudinary cloudinary = new Cloudinary();
Map response = cloudinary.upload("my_file.pdf", ObjectUtils.asMap("resource_type", "raw"));
String url = (String) response.get("url");
// Add url to database
Regarding configuration parameters for secure API calls
Doing it manually is more involved (sans Cloudinary's libary), but I can take you through it if you'd like.

Drazen Bjelovuk
- 5,201
- 5
- 37
- 64
-
In case of pdf files, no need to set the resource_type to raw. They are accepted as images as well. – Tal Lev-Ami Feb 01 '16 at 19:38