1.2.5 Email Contact Form - File uploading (image attachment)

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
User avatar
jsw_nz
Posts: 907
Joined: Fri 2. Apr 2004, 02:42
Location: New Zealand

1.2.5 Email Contact Form - File uploading (image attachment)

Post by jsw_nz » Fri 2. Sep 2005, 00:25

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..

User avatar
Oliver Georgi
Site Admin
Posts: 9450
Joined: Fri 3. Oct 2003, 22:22
Location: Dessau
Contact:

Post by Oliver Georgi » Sat 3. Sep 2005, 10:09

you mean new contact form?

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Kleintierpraxis am Georgengarten

User avatar
Oliver Georgi
Site Admin
Posts: 9450
Joined: Fri 3. Oct 2003, 22:22
Location: Dessau
Contact:

Post by Oliver Georgi » Sat 3. Sep 2005, 10:19

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
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Kleintierpraxis am Georgengarten

User avatar
jsw_nz
Posts: 907
Joined: Fri 2. Apr 2004, 02:42
Location: New Zealand

Post by jsw_nz » Sun 4. Sep 2005, 04:56

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

Ben
Posts: 558
Joined: Wed 14. Jan 2004, 08:05
Location: Atlanta
Contact:

Post by Ben » Sun 4. Sep 2005, 18:17

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.

User avatar
anthony.abraira
Posts: 99
Joined: Sun 11. Sep 2005, 07:42
Location: Mars Hill, NC
Contact:

Email Contact Form: Specify Values For Proper Function

Post by anthony.abraira » Mon 31. Oct 2005, 23:24

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

Ben
Posts: 558
Joined: Wed 14. Jan 2004, 08:05
Location: Atlanta
Contact:

Post by Ben » Mon 31. Oct 2005, 23:29

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"

User avatar
anthony.abraira
Posts: 99
Joined: Sun 11. Sep 2005, 07:42
Location: Mars Hill, NC
Contact:

Thank you!

Post by anthony.abraira » Wed 2. Nov 2005, 10:43

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

rosemckay
Posts: 54
Joined: Thu 13. Oct 2005, 00:59

Post by rosemckay » Sat 8. Sep 2007, 04:26

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?

macangelo
Posts: 756
Joined: Sat 29. Nov 2003, 14:19
Location: Düsseldorf
Contact:

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

Post by macangelo » Fri 10. Feb 2017, 08:51

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!
Webdesign from Düsseldorf - made with phpwcms (most of it):
http://eyelikeit.com/index.php?de_beispiele-webdesign

User avatar
Oliver Georgi
Site Admin
Posts: 9450
Joined: Fri 3. Oct 2003, 22:22
Location: Dessau
Contact:

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

Post by Oliver Georgi » Fri 10. Feb 2017, 09:20

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"
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Kleintierpraxis am Georgengarten

Post Reply