Sha256: 769fb6f2f9d4b550bb2251eea220be6f41173735725bcaad79794841883ae9c1
Contents?: true
Size: 444 Bytes
Versions: 5
Compression:
Stored size: 444 Bytes
Contents
module Scrivito 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
5 entries across 5 versions & 1 rubygems