Sha256: 91772d0054bcaca75393d81efab6b2494c4c84211d0db426944872a4445f44d4

Contents?: true

Size: 229 Bytes

Versions: 1

Compression:

Stored size: 229 Bytes

Contents

require "base64"

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

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
notifications-ruby-client-5.1.2 lib/notifications/client/helper_methods.rb