Programmatically upload file from client machine

  • Thread starter Thread starter Beatrice
  • Start date Start date
B

Beatrice

I am stuck with this problem and desperately need your help.

I would like to upload an xml file or any file from client machine and
then save it to the server machine. Since the file path on the client
machine is predefined within the program, I am using the HTMLInputFile
control, postedfile, saveas ... and set the input control visibility
to hidden. However, the control value is read only and there is no way
I can set the client file path. I am wondering if there is a simple
way to uploading a file without user selection/specification?

Thanks in advance for your help.
Beatrice
 
Hello

There is no way you can do this with HTML. The value property is read only
for security so that malicious sites don't attempt to read files from the
client computer
without the user approval. If browsers allow this, it would be a big
security hole.

Best regards,
Sherif
 
Thanks Sherif!

Then, is there any way to upload xml document on the client-side using JScript?

Thanks again!
Beatrice
 
Although there are methods that allow you to use client side files,
they will all ask you to confirm it's use, or will stop you if you
dont have privileges. Consider using an HTA instead of an HTM
application. You get asked, but only once.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top