Add file paths to form tokens - #437
Conversation
|
The reason why the bulky items storage exists is so that you can also re-send a file with attachments (whether that's an attachment or a download link via Can you elaborate why you want to work with a temporary path that can be gone in a few hours rather than just linking to the bulky items storage item which is already implemented? |
|
Because file uploads can be stored in the Contao |
|
So |
|
correct. The Contao file upload widget (and or fineuploader) actually replaces the |
|
Kinda wonder if we can/should add some guard to only provide this info if it's an upload that's been moved to |
|
I don't see the point. Its up to the user to correctly configure their form and notification, there's no point and no harm in sending a useless temporary path. I would not send the path to the bulky items storage because you don't want people to mess with that. |
In NC 1.x, if
xxxwas a file upload field, theform_xxxwould contain the path to the uploaded file. In NC2 this now contains the voucher for bulky items storage.This PR re-adds a simple token for the file path, because sometimes you don't want to send the file by email but store it on the server and get the path by email (e.g. for manual download, secure contract review etc.).
I have manually tested this and it seems to work flawlessly. If you do not check "Store files" in the form generator, the email will contain the temporary PHP path (which makes no sense but shouldn't harm).