Allow multiple photos to be uploaded as a string

This commit is contained in:
2024-04-24 20:46:21 +10:00
parent 32bb14cc48
commit e83bf3e414

View File

@@ -84,8 +84,10 @@ module Micropub
end
elsif params[:properties][:photo].is_a?(Hash)
params[:properties][:photo]
elsif params[:properties][:photo]
{value: params[:properties][:photo], alt: ""}
elsif params[:properties][:photo].is_a?(String)
params[:properties][:photo].split(" ").map do |photo|
{value: photo, alt: ""}
end
else
[]
end