Skip to content

Help with sending emails with attached files #1292

Answered by AIC-BV
valentesolucoes asked this question in Q&A
Discussion options

You must be logged in to vote

I have this code

{{ form_ajax('onAddPhotos', {
        class: 'form-fileupload',
        files: true,
        success: 'document.querySelector("#popup-photos").classList.remove("show")',
        flash: true
    })
}}
  <input type='file' id='image-files' name='image-files[]' multiple accept='image/*,.pdf'>
{{ form_close() }}

I notice your name does not have the array notation []: https://wintercms.com/docs/v1.2/docs/database/attachments#:~:text=%3Cinput%20type%3D%27file%27%20name%3D%27files%5B%5D%27%20multiple%3E (i've had this issue in the past too)

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
1 reply
@valentesolucoes
Comment options

Comment options

You must be logged in to vote
7 replies
@valentesolucoes
Comment options

@valentesolucoes
Comment options

@AIC-BV
Comment options

@AIC-BV
Comment options

Answer selected by valentesolucoes
@valentesolucoes
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants