Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boltforms uploads/attachments ignore config settings #82

Open
ghost opened this issue Aug 23, 2021 · 1 comment
Open

Boltforms uploads/attachments ignore config settings #82

ghost opened this issue Aug 23, 2021 · 1 comment

Comments

@ghost
Copy link

ghost commented Aug 23, 2021

Working with bolt 5 beta 10.

The uploads: settings seems to be ignored entirely and files are uploaded to /uploads/ by default even if enabled is explicitly set to false. As far as I've been able to tell, all child keys are ignored.

filename_handling: "suffix" is also ignored. defaults to prefix.

I have no clue if management_controller works as expected, but I've set it to false.

the attach_files: true key is also ignored.

At this point file type fields cannot safely be used.

My result: emails submit without attachments and my uploads folder is flooded with files.

@enthus1ast enthus1ast mentioned this issue Jan 21, 2022
@UtechtDustin
Copy link
Contributor

I run in the same issue, it seems the documentation is not up to date.
I checked the source code and you have to add attach: true to the file field(s).

if (isset($fieldConfig['attach']) && $fieldConfig['attach']) {
$event->addAttachments([$field->getName() => $files]);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant