This is a migrated thread and some comments may be shown as answers.

[Solved] Any way to set value to the input file without firing the click event ?

2 Answers 143 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
walid
Top achievements
Rank 1
walid asked on 20 Apr 2009, 09:56 AM
HI,
I was working on a solution to select multi files using activex component, i would like to fill the radUploder with the selected files.
It seems like the radUpload does not allow Setting value to the adding inputFile.
Is Any way or any solution in this case so i can fill the raduploader with my selected files ? Any way to set text  to the added inputFile?
it must be a way to do it :) i just can't find it. this is how my code looks like

 


function
ClientCallBackFunction(radWindow, returnValue)

 

{

 

//check if a value is returned from the dialog

 

 

var uploader = $find('<%= RadUpload1.ClientID %>');

 

 

 

if (returnValue !=null)

 

{

 

 for(var i=0;i<returnValue.length;i++)

 

  {

     uploader.addFileInput();

     uploader.getFileInputs()[i].title = returnValue[i];

     uploader.getFileInputs()[i].alt = returnValue[i];

     uploader.getFileInputs()[i].value = returnValue[i];

  }

 }

}

2 Answers, 1 is accepted

Sort by
0
Accepted
Atanas Korchev
Telerik team
answered on 20 Apr 2009, 10:17 AM
Hi walid,

This is not possible as it is considered a security risk. If this were possible malicious web sites would be able to steal (by uploading) arbitrary files from the user computer. You can check this help article which lists all known limitations of RadUpload.
 
Regards,
Albert
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
walid
Top achievements
Rank 1
answered on 20 Apr 2009, 11:10 AM
thx
Tags
Upload (Obsolete)
Asked by
walid
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
walid
Top achievements
Rank 1
Share this question
or