Reputation: 1313
Despite the well-documented Cloudinary API, I failed to use office docs Aspose conversion in my CarrierWave::Uploader. Here is my best shot:
class CamplogPicUploader < CarrierWave::Uploader::Base
include Cloudinary::CarrierWave
cloudinary_transformation :resource_type=>:raw do
process raw_convert: 'aspose'
end
end
Office documents are well uploaded to Cloudinary but no associated pdf created as well. Anybody can help?
Kevin
Upvotes: 1
Views: 74
Reputation: 1457
To upload an office files and convert it using Aspose you can use the following:
cloudinary_transformation resource_type: "raw", raw_convert: "aspose"
To access the pdf you can use:
pic.url(resource_type: "image", format: "#{pic.format}.pdf")
Upvotes: 1