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