configuring fileupload dynamically

1 reply. Last post: April 19, 2010 12:04 PM by Handy Surya
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
caMember

hi,


i want to configure the file upload from the backend. Because i am generating uploading path dynamic. The code for getting the existing images on the media gallery is working fine.

But the simple code below is not working completely,

     protected void Page_Load(object sender, EventArgs e)
{

if (IsPostBack)
{

// the three lines below seems not working
WebTextEditor1.FileUploaderSettings.Enabled = true;
WebTextEditor1.FileUploaderSettings.DefaultUploadPath = "newsletter/" + userfolder + "/image/";
WebTextEditor1.FileUploaderSettings.DefaultUploadMediaResource = "newsletter/" + userfolder + "/image/";


WebTextEditorMediaResourceGroup wtemrg = new WebTextEditorMediaResourceGroup();
wtemrg.Name = "BImage";
wtemrg.Text = "CImage";
wtemrg.GroupResourceVisible = true;

WebTextEditorResource rmg = new WebTextEditorResource();
rmg.Name = "Image";
rmg.AllowUserUpload = true;
rmg.SearchInChildFolder = true;
rmg.Text = "AImage";
rmg.Url = "newsletter/" + userfolder + "/image/";

wtemrg.Resources.Add(rmg);
WebTextEditor1.MediaResources.Add(wtemrg);

}



When i click inser from file shows the error shown in the image below .

NB: Some times iam also getting the same error while trying to attach file in this forum.


thanks and regards

ca

1 attachment
All times are GMT -5. The time now is 6:00 AM.
Previous Next