Hello, I'm new to this forum but have a question:

Can I populate a file form field (<input type="file">) with javascript? If so how?

What I need to do is to upload a file to the server without user intervention. I'm getting the local path to the file as a post variable and want to be able to upload it directly without showing the user a "browse" button. I thought I could use javascript to populate a <input type="file"> form field and then submit that automatically.

Is this possible? Is there a better/easier way?

Thanks