Sha256: 7b19984b3f890c0c4b963a842d227c27d00f9ce169756c2bdbb59f5a6b35bc4c

Contents?: true

Size: 233 Bytes

Versions: 7

Compression:

Stored size: 233 Bytes

Contents

require "base64"

module Notifications
  def self.prepare_upload(file)
    raise ArgumentError.new("Document is larger than 2MB") if file.size > Client::MAX_FILE_UPLOAD_SIZE

    { file: Base64.strict_encode64(file.read) }
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
notifications-ruby-client-5.1.1 lib/notifications/client/helper_methods.rb
notifications-ruby-client-5.1.0 lib/notifications/client/helper_methods.rb
notifications-ruby-client-4.0.0 lib/notifications/client/helper_methods.rb
notifications-ruby-client-3.1.0 lib/notifications/client/helper_methods.rb
notifications-ruby-client-3.0.0 lib/notifications/client/helper_methods.rb
notifications-ruby-client-2.10.0 lib/notifications/client/helper_methods.rb
notifications-ruby-client-2.9.0 lib/notifications/client/helper_methods.rb