basically i have this form that allows user to upload to my server:

<form id = "uploadbanner" method = "post" action = "#"> <input id = "fileupload" type = "file" /> <input type = "submit" value = "submit" id = "submit" /> </form> 

But the problem is that when i upload a file, then click submit, i don't see the file upload in the server directory.

2

3 Answers

<form enctype="multipart/form-data" method="post" action="#"> <input name="myfile" type="file" /> <input type="submit" value="submit" /> </form> 

To upload a file, it is essential to set enctype="multipart/form-data" on your form

You need that form type and then some php to process the file :)

You should probably check out Uploadify if you want something very customisable out of the box.

2

You need enctype="multipart/form-data" otherwise you will load only the file name and not the data.

2

On top of what the others have already stated, some sort of server-side scripting is necessary in order for the server to read and save the file.

Using PHP might be a good choice, but you're free to use any server-side scripting language. may be of use on that end.

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy