Click here to Skip to main content
15,892,537 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Referring to Mini Ajax File Upload Form[^] and its demo, I created a .htm file. In this page, there is only a Upload button. After I clicked the button, I could navigate to a folder to select a file. The file name thus displayed on the page.
I also tried the code in http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_fileupload_files. I could select a file. But there is no further action for how to save the selected file.
But I don't know what else should I do to save the file into my server. Thanks if you can help.
Posted
Updated 6-Jan-16 6:12am
v2
Comments
Richard Deeming 6-Jan-16 13:52pm    
You'll need some code running on the server to handle the upload. How you write that code will depend on what technology you're using on the server, which you haven't told us.
Sergey Alexandrovich Kryukov 6-Jan-16 14:07pm    
Do you understand that, in addition to JavaScript (which don't really need, because a simple HTML form can do it), you also need appropriate server-side code?
And you did not even mention that you have a server side. :-)
—SA
s yu 28-Jan-16 15:00pm    
Problem solved by using the code from http://www.aspdotnet-suresh.com/2015/02/jquery-upload-images-files-without-page-refresh-postaback-in-aspnet.html. Thanks.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900