Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Allow File Attachments #3

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

linchpinstudios
Copy link
Contributor

Allow users to attach files to their forms and email them to the owner.

  • Set a public $files = []; on the model to define files that should be attached.
  • Setup UploadedFile object foreach $files on model
  • Setup attachContent on ownerMail to get file content and attach it to the email.
  • Added errors to the response of the form to return submission validation errors.

Copy link
Contributor

@Luuc15 Luuc15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes use an attribute to be the field that defines the fields that have files that have to be emailed. It would be better to use a method for this so the attributes will always relate to a field.
Like a getUploadedFiles function. You can even let this function just loop all fields to check if it is an upload field.

Also the foreach loop reading all file fields uses attachContent function as if we can only upload one file per field. It would be better to be able process multi-fileupload as wel

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

Successfully merging this pull request may close these issues.

2 participants