Module: DocumentCloud::API::Upload
Constant Summary collapse
- UPLOAD_PATH =
'/upload.json'
Instance Method Summary collapse
-
#upload(file, title, options = {}) ⇒ Object
Upload a document.
Methods included from Utils
#build_object, #build_objects, #parse_json
Instance Method Details
#upload(file, title, options = {}) ⇒ Object
Upload a document
22 23 24 |
# File 'lib/document_cloud/api/upload.rb', line 22 def upload(file, title, ={}) build_object DocumentCloud::Document, post(UPLOAD_PATH, .merge(file: file, title: title)) end |