|
case file.path |
|
when /\.jpe?g\z/i then 'image/jpeg' |
|
when /\.png\z/i then 'image/png' |
|
else |
|
raise ArgumentError, "invalid file extension: #{file.path}" |
|
end |
If using the file with no extension, this caused an error. For eg: "/var/folders/m3/p364c0313fv0mhbl3llm4bvw0000gp/T/ActiveStorage-27-20210918-49325-1bu8npn"
line-bot-sdk-ruby/lib/line/bot/client.rb
Lines 1078 to 1083 in 147323c
If using the file with no extension, this caused an error. For eg:
"/var/folders/m3/p364c0313fv0mhbl3llm4bvw0000gp/T/ActiveStorage-27-20210918-49325-1bu8npn"