Rank: Newbie Groups: Member
Joined: 3/25/2008 Posts: 2
|
Hi all, I am using an ActiveX for editing local images. Once the user finished editing an image, I would upload the image to the server. That means the local filename is known by advance and is not retrieved by the AjaxUploader component "browse" button. Is it possible from the client side to specify a local file for uploading and call then the AjaxUploader javascript method upload(). Here is what I tried without success:
Code: JavaScript
var eoInput = document.getElementById("AJAXUploader_i_0");
if (eoInput) {
eoInput.value = "C:\temp\MyImage.bmp";
var eo = document.getElementById("AJAXUploader");
if (eo) eo.upload();
}
Thanks
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
It's impossible to upload a file without user intervention with JavaScript. None of the modern browsers will allow you to do that because that would allow people to write a page to grab user files without their consent.
In your case, since you already use ActiveX control, you may want to consider using ActiveX control to transfer files as well.
Thanks
|