Sha256: 3ba85e87c5b169d617ad7e3ce4d3a3977f3b58492ac08464ede11448a45f52e0
Contents?: true
Size: 308 Bytes
Versions: 2
Compression:
Stored size: 308 Bytes
Contents
module NightcrawlerSwift class Upload < Command def execute path, file content_type = MultiMime.by_file(file).content_type response = put "#{connection.upload_url}/#{path}", body: file.read, headers: {content_type: content_type} [200, 201].include?(response.code) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
nightcrawler_swift-0.2.3 | lib/nightcrawler_swift/upload.rb |
nightcrawler_swift-0.2.2 | lib/nightcrawler_swift/upload.rb |