Sha256: d5b50b838dd39511b2bd38e4d92c2c2591c508fd216006519658ba8fffa791b8
Contents?: true
Size: 450 Bytes
Versions: 1
Compression:
Stored size: 450 Bytes
Contents
module RailsConnector class CmsRestApi module BlobUploader class << self def upload_file(file) upload_permission = CmsRestApi.get('blobs/upload_permission') fields = upload_permission['fields'].to_a + [[:file, file]] # Net/HTTP does not support multipart forms RestClient.post(upload_permission['url'], fields) upload_permission['blob'] end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
infopark_cloud_connector-7.1.0 | lib/rails_connector/cms_rest_api/blob_uploader.rb |