diff --git a/src/Handler/Utils/Workflow/EdgeForm.hs b/src/Handler/Utils/Workflow/EdgeForm.hs index abb672e4b..e0750743d 100644 --- a/src/Handler/Utils/Workflow/EdgeForm.hs +++ b/src/Handler/Utils/Workflow/EdgeForm.hs @@ -351,9 +351,13 @@ workflowEdgePayloadFields specs = evalRWST (forM specs $ runExceptT . renderSpec | otherwise -> \case Nothing -> Just $ Set.singleton p Just _ -> Nothing + let wpffConfig' = wpffConfig & _fieldAdditionalFiles %~ (fRefs' <>) + where fRefs' = review _FileReferenceFileReferenceTitleMap . Map.fromList $ do + FileReference{..} <- Set.toList =<< hoistMaybe fRefs + return (fileReferenceTitle, (fileReferenceContent, fileReferenceModified, FileFieldUserOption False True)) wSetTooltip' (fmap slI18n wpffTooltip) $ f' (nonEmpty . Set.toList) wpffOptional - (convertFieldM (\p -> runConduit $ transPipe liftHandler p .| C.foldMap Set.singleton) yieldMany . genericFileField $ return wpffConfig) + (convertFieldM (\p -> runConduit $ transPipe liftHandler p .| C.foldMap Set.singleton) yieldMany . genericFileField $ return wpffConfig') ( fsl (slI18n wpffLabel) & maybe id (addName . ($ "file")) mNudge )