Class: RemoveBg::Upload
- Inherits:
-
Object
- Object
- RemoveBg::Upload
- Defined in:
- lib/remove_bg/upload.rb
Class Method Summary collapse
Class Method Details
.for_file(file_path) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/remove_bg/upload.rb', line 6 def self.for_file(file_path) if !File.exist?(file_path) raise RemoveBg::FileMissingError.new(file_path) end content_type = determine_content_type(file_path) FARADAY_FILE.new(file_path, content_type) end |