<script type="file" name="photo"> ?

  etherington 13:04 31 Jan 2008
Locked

Hi,
I'm trying to add an "upload your photo here" to the form here:

click here

which seems to work from the user end - it allows you to navigate to the file and select it.

Then when you submit it, the form arrives with no file but a (useless) link the to the user's local file on their desktop (C:\desktop\filename sort of thing) all in text

I've scoured the help sites but can't see what I'm missing - any ideas?
ta
Mike

  ElanMan 16:48 31 Jan 2008

Inside your form tag you need to have enctype="multipart/form-data" to enable it to handle file uploads.
e.g.form method="post" enctype="multipart/form-data" action="../cgi-bin/novice.cgi" onsubmit="return validate();"

  etherington 17:45 31 Jan 2008

Oh this is interesting - I added the enctype bit and it now seems to ignore the success page tag and take you to one within the novice.cgi file and the image is embedded hex in the resulting email, and not detachable.

I feel like we're getting warmer but I'm out of my comfort zone a bit here. Thanks for other suggestions.
Mike

  etherington 17:49 31 Jan 2008

actually it's not picked up any of the other input fields either so I'm not sure what i've done wrong.

  Forum Editor 18:57 31 Jan 2008

and popular way to handle uploads:

click here

  etherington 07:49 01 Feb 2008

Looks good but a cost of $50 - I'd love get the code working before I resort to paying ;)

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Xiaomi Mi Mix 2 review

What went wrong at the Designs of the Year 2017

iPhone X news: Release date, price, new features & specs

Comment regarder des séries et talk-shows américains en France ?