Sha256: 1831ca4d47df6894d01460af51c26ae051e23a68b6a904e44d2644c6b2a3137b
Contents?: true
Size: 310 Bytes
Versions: 1
Compression:
Stored size: 310 Bytes
Contents
module FileIoClient class Upload class << self def file(path, options = {}) json_response, result_status = Open3.capture2("curl --silent --form 'file=@#{path}' https://file.io") raise CurlError unless result_status == 0 File.new(json_response) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
file_io_client-0.0.2 | lib/file_io_client/upload.rb |