I’m going through your REST API line by line after installing the appropriate gem…
Everything is copacetic until I get up to here :
responseStream = RestClient.get(signedURI, :accept => ‘application/json’)
Which returns :
RestClient::BadRequest: 400 Bad Request
The steps that preceded this and worked properly were :
begin
# require_relative 'saaspose_common'
productURI = 'http://api.saaspose.com/v1.0'
Common::Product.setBaseProductUri(productURI)
appSID = '4009d1 < i omitted this, but used what was on my app page > 795626b'
appKey = '19bf < i omitted this, but used what was on my app page > 9da3cc0b'
Common::SaasposeApp.new(appSID,appKey)
# filePath = 'C:/Sample.pdf'
# use carrierwave to transpose this url..
filePath = Rails.root.join('public/system/saaspose/Sample.pdf')
fileName = File.basename(filePath)
# Upload input Word document
urlFile = 'http://api.saaspose.com/v1.0/storage/file/' + fileName
signedURI = Common::Utils.sign(urlFile)
#RestClient.put( signedURI,File.new(filePath, 'rb'))
p 'Input PDF document uploaded successfully'
#build URI to convert to TIFF
strURI = 'http://api.saaspose.com/v1.0/pdf/' + fileName + '?format=html'
#sign URI
signedURI = Common::Utils.sign(strURI)
Submitted from: http://saaspose.com/