From 05993db6ec446f1e3e1e7ee19bf5215ede6afd6c Mon Sep 17 00:00:00 2001 From: Daniel Nitsikopoulos Date: Wed, 24 Apr 2024 20:51:26 +1000 Subject: [PATCH] Allow multiple photos for string URLs --- slices/micropub/request_parser.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/slices/micropub/request_parser.rb b/slices/micropub/request_parser.rb index 49acf93..017d19e 100644 --- a/slices/micropub/request_parser.rb +++ b/slices/micropub/request_parser.rb @@ -106,7 +106,9 @@ module Micropub }) else photos = if params[:photo].is_a?(String) - [{value: params[:photo], alt: ""}] + params[:photo].split(" ").map do |photo| + {value: photo, alt: ""} + end elsif params[:photo].nil? [] else