Module: DiscourseApi::API::Uploads
- Included in:
- Client
- Defined in:
- lib/discourse_api/api/uploads.rb
Instance Method Summary collapse
Instance Method Details
#upload_file(args) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/discourse_api/api/uploads.rb', line 5 def upload_file(args) args = API .params(args) .optional(:file, :url, :user_id) .default(type: "composer", synchronous: true) .to_h post("/uploads", args) end |