Click to See Complete Forum and Search --> : How can I check if a file existing with JavaScript


robot
12-02-2003, 05:20 AM
In my page, the user will upload a file to the server. The user will either select the file by browse button or input the full path of file directly. Before the upload action, I want to check if the file is existing. If not, no more action.

How can I do this?

clairec666
12-02-2003, 05:23 AM
This won't be possible with JavaScript. You can't 'see' what files a person holds on their computer from though the browser, apart from cookies. You will only be able to check the validity of the file once it has been uploaded.

robot
12-02-2003, 05:50 AM
Originally posted by clairec666
This won't be possible with JavaScript. You can't 'see' what files a person holds on their computer from though the browser, apart from cookies. You will only be able to check the validity of the file once it has been uploaded.

That is what I can do is check the file on server?