Page 1 of 1

1.2.5 Email Contact Form - File uploading (image attachment)

Posted: Fri 2. Sep 2005, 00:25
by jsw_nz
I have yet to get the 'file option' to properly send an image file (small jpg for testing purposes). Has anyone been able to get this nice feature to work? My general understanding is that the file should come across as an attachment in email itself.

Interested to hear if others have gotten this to work. Are there special mail settings that need to me met. Now using mail (defaults)

Cheers..

Posted: Sat 3. Sep 2005, 10:09
by Oliver Georgi
you mean new contact form?

Oliver

Posted: Sat 3. Sep 2005, 10:19
by Oliver Georgi
for upload use:

attachment = 1

additional values are:

exclude = php,asp,php3,php4,php5,aspx,cfm,js
folder = 'mypath/' -> default value is 'content/form/'
maxlength = 1024 -> Bits
accept = 'text/*'-> default is not set, any mime type

Try it :)

Oliver

Posted: Sun 4. Sep 2005, 04:56
by jsw_nz
EXCELLENT
works great now...
Very nice new feature for Wcms!

Not sure how easy it would be to implement the elegant date picker for email contact form.....(referring to the one used in article summary section)...this would be a nice new feature...did mention this in feature requests.

Oliver, I am sure I can speak for the whole communty, of what a great accomplishment Wcms is.

Respect,
:D

Posted: Sun 4. Sep 2005, 18:17
by Ben
Yeah, the file upload feature works well for me and is an excellent feature. I, too, would love to see the date picker added to e-mail contact forms.

Email Contact Form: Specify Values For Proper Function

Posted: Mon 31. Oct 2005, 23:24
by anthony.abraira
Sorry for the stupid question, but somebody was bound to do it. In this case...mejavascript:emoticon(':oops:')

where do i set these values?:?:
Oliver Georgi wrote:for upload use:

attachment = 1

additional values are:

exclude = php,asp,php3,php4,php5,aspx,cfm,js
folder = 'mypath/' -> default value is 'content/form/'
maxlength = 1024 -> Bits
accept = 'text/*'-> default is not set, any mime type

Try it :)

Oliver

Posted: Mon 31. Oct 2005, 23:29
by Ben
You'll add the info to the 'value:' box for the 'file' form field. Here's what I'm using for one of my forms:

Code: Select all

attachment="1"
accept="text/*"
folder="phpwcms_ftp"
exclude="php,asp,php3,php4,php5,aspx,cfm,js,bat,exe,html,htm"

Thank you!

Posted: Wed 2. Nov 2005, 10:43
by anthony.abraira
Ben wrote:You'll add the info to the 'value:' box for the 'file' form field. Here's what I'm using for one of my forms:

Code: Select all

attachment="1"
accept="text/*"
folder="phpwcms_ftp"
exclude="php,asp,php3,php4,php5,aspx,cfm,js,bat,exe,html,htm"
One more little detail to add was to add {upload} to the "template" section o n the bottom. But I got it now. Thanks a million! :D

Posted: Sat 8. Sep 2007, 04:26
by rosemckay
Hi, dumb question but I want to set it up to only accept pdfs and word docs but i can't figure out what the "accept" wants too see there. I've tried .pdf and .doc but it gets striped when I update. Can someone help?

Re: 1.2.5 Email Contact Form - File uploading (image attachment)

Posted: Fri 10. Feb 2017, 08:51
by macangelo
Oliver has made an update here: You no longer list extensions you want to exclude. You only list the extensions you want to allow. For example if you want to allow Word Documents and PDF you write (for newer versions, mine is 1.8.2):

Code: Select all

accept=".pdf,.docx"
attachment=1
Thank you Oliver!

Re: 1.2.5 Email Contact Form - File uploading (image attachment)

Posted: Fri 10. Feb 2017, 09:20
by Oliver Georgi
Beginning with v1.8.7 the behaviour of accept has changed. From now on only file extensions are used – maybe I change or extend that again. But the <input file> attribute accept is a very soft option which can be overwritten easily on browser's side. Now the file extension is checked on server's side too. If this is set, the attribute exclude is no longer needed.

Code: Select all

accept="pdf,docx"