web application
web application

Reputation: 41

Specify File upload path

i have this form on uploading a file, but i cant seem to set the path where to save the file to be uploaded. How can I upload the file to specified folder? take note: using, possibly, javascript

Here is my code:

<form method="post" action="file-upload-1.htm" name="submit" enctype="multipart/form-data">
<input type="file" name="fileField"><br /><br />
<input type="submit" name="submit" value="Submit">
</form>

Upvotes: 4

Views: 1413

Answers (2)

Shawn Lehner
Shawn Lehner

Reputation: 1323

You can only specify variable information from the front-end/HTML side. To control what happens once the file reaches the server you need to do this via your server side code. I have included a few examples below for how to accept and save a file.

Upvotes: 2

hoeni
hoeni

Reputation: 3280

For saving a file on the server you always need a server side component to save the file, there is no way to build a client-only solution.

Imagine: Everybody could tell their client to store files on your server otherwise. :-)

Upvotes: 5

Related Questions