Sha256: 5c30ea40b4a872444e91c8ab94ae845c639303a551e042ef0285cccab3079ed4

Contents?: true

Size: 316 Bytes

Versions: 22

Compression:

Stored size: 316 Bytes

Contents

# frozen_string_literal: true
module DiscourseApi
  module API
    module Uploads
      def upload_file(args)
        args = API.params(args)
          .optional(:file, :url, :user_id)
          .default(type: 'composer', synchronous: true)
          .to_h
        post('/uploads', args)
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
discourse_api-1.1.0 lib/discourse_api/api/uploads.rb
discourse_api-1.0.0 lib/discourse_api/api/uploads.rb
discourse_api-0.48.1 lib/discourse_api/api/uploads.rb
discourse_api-0.48.0 lib/discourse_api/api/uploads.rb
discourse_api-0.47.0 lib/discourse_api/api/uploads.rb
discourse_api-0.46.0 lib/discourse_api/api/uploads.rb
discourse_api-0.45.1 lib/discourse_api/api/uploads.rb
discourse_api-0.45.0 lib/discourse_api/api/uploads.rb
discourse_api-0.44.0 lib/discourse_api/api/uploads.rb
discourse_api-0.43.1 lib/discourse_api/api/uploads.rb
discourse_api-0.43.0 lib/discourse_api/api/uploads.rb
discourse_api-0.42.0 lib/discourse_api/api/uploads.rb
discourse_api-0.41.0 lib/discourse_api/api/uploads.rb
discourse_api-0.40.0 lib/discourse_api/api/uploads.rb
discourse_api-0.39.3 lib/discourse_api/api/uploads.rb
discourse_api-0.39.2 lib/discourse_api/api/uploads.rb
discourse_api-0.39.1 lib/discourse_api/api/uploads.rb
discourse_api-0.39.0 lib/discourse_api/api/uploads.rb
discourse_api-0.38.0 lib/discourse_api/api/uploads.rb
discourse_api-0.37.0 lib/discourse_api/api/uploads.rb