I'm trying to add a link to a front-end upload in an email notification. The docs say "To send notifications that include a direct link to your file, you can enable Template Overrides". I've done that, but all I can get is a link to a temporary file in cpresources/tempassets which doesn't exist any more.

I can't see how the code in the docs could be used in the email.html override file.

This is from the docs: (https://sprout.barrelstrengthdesign.com/craft-plugins/forms/docs/examples/front-end-file-uploads)

{% set resume = object.resumeAssetFieldHandle.first() %}
Resume: {{ resume.getUrl() }}

But that doesn't work for me. Presumably resumeAssetFieldHandle is just an example field name but I don't know what the object is.

I have (after line 44)

{% if field.handle == 'uploadFile' %}
{{ value[0].getUrl() }}
{% endif %}

Which gives me the temp link.

Any pointers to how I can get the permanent link?



I was adding {slug} in the upload location. This worked for the final file but seems to trigger the behaviour where it links to the temp file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.