Add cast to fix sending File URLs.
This commit is contained in:
parent
cebc91d13a
commit
60835022fb
|
@ -79,8 +79,9 @@ module Telepathy
|
|||
when String
|
||||
formdata.field("photo", photo.as(String))
|
||||
when File
|
||||
formdata.file("photo", photo.as(IO),
|
||||
HTTP::FormData::FileMetadata.new(filename: File.basename(photo.path)))
|
||||
photo_file = photo.as(File)
|
||||
formdata.file("photo", photo_file,
|
||||
HTTP::FormData::FileMetadata.new(filename: File.basename(photo_file.path)))
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user