formie icon indicating copy to clipboard operation
formie copied to clipboard

Use public URL of assets in notifications for File Upload fields

Open bfjare opened this issue 1 year ago • 1 comments

Describe the bug

I have a client whose forms is for them accept files that sometimes are large so they cant be attached to the email.

The field setting in the notification is to the control panel "/admin/assets/edit/10004-Flight-Fund-2023-10" which isn't useful to the client since it doesn't have the full site url and I cant seem to be able to customize it or chose the public url.

Any chance we can get a little flexibility with this?

Thanks,

Steps to reproduce

  1. Have a form that accepts large attachments and sends a url by email

Form settings

  • Multi-page form: No
  • Submission Method: Ajax
  • Client-side Validation: Yes
  • Custom Form Templates: No

Craft CMS version

4.4.17

Plugin version

2.0.34.1

Multi-site?

No

Additional context

No response

bfjare avatar Nov 07 '23 22:11 bfjare

It's on our todo list to handle this better for a few different fields (see https://github.com/verbb/formie/issues/753) but there's not really a solution yet. You would need to override this with Template Overrides for Email Templates.

It'd be a matter of replacing this line: https://github.com/verbb/formie/blob/ad50200dbab9e872b77d042acc61b1098b8582df/src/templates/_special/email-template/fields/file-upload.html#L12

engram-design avatar Nov 08 '23 11:11 engram-design

Updated in 3.0.0

engram-design avatar Aug 06 '24 03:08 engram-design