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

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

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

asked Apr 11, 2011 at 21:55

2

  • HTML tin but select and transport the file content. It'southward the server's responsibility to become the file content. HTML doesn't run in the server. Only server side languages like Java/C#/PHP/JSP/ASP/etc runs on the server side. Yet you lot didn't mention which one you're using. The answer depends on that. And then please mention and tag which i you lot're using. Based on your question history information technology's PHP. Is this true? If so, then this question is a gull of stackoverflow.com/questions/198346/…

    Apr 11, 2011 at 21:59

  • What is your backend linguistic communication? You cannot just put HTML on a folio and expect your web browser to upload things to your computer. That would be a huge security flaw.

    Apr 11, 2011 at 21:59

three Answers 3

                  <course id="uploadbanner" enctype="multipart/class-data" method="post" activeness="#">    <input id="fileupload" name="myfile" type="file" />    <input blazon="submit" value="submit" id="submit" /> </form>                                  

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

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

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

answered Apr eleven, 2011 at 21:57

two

  • It should exist enctype="multipart/form-information" otherwise you lot will load simply the file name and not the data.

    Nov 22, 2013 at nine:50

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

worldofjr

3,799 8 gilded badges 33 silver badges 48 bronze badges

answered Oct 29, 2014 at 17:51

1

  • At that place is no demand to echo other comments. The respond was already edited to comprise this.

    Oct 13, 2016 at 14:47

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

Using PHP might exist a good selection, simply you're gratuitous to use any server-side scripting linguistic communication. http://world wide web.w3schools.com/php/php_file_upload.asp may be of use on that finish.

M. Wiśnicki

five,885 three golden badges 21 silver badges 27 statuary badges

answered Jun twenty, 2016 at 9:23

2

  • It isn't fine. Every bit Calum pointed out iv years ago, it is missing the enctype aspect.

    Jun 20, 2016 at 9:28

  • well, I thought it would be redundant if I say the same thing once more that's all ;)

    Jun 21, 2016 at 5:thirteen

Not the answer yous're looking for? Scan other questions tagged html file-upload or enquire your own question.