Hi,
I have been using the new version of Kentico 8 and I am having some problems with the cms control MultiFileUploader.
I want to develop a form in asp.net that takes some parameters (name, amount, pictures) and store them in a page type. I have managed to create the form and create the page type with the name and the amount fields.
But I am not able to upload the pictures in the system and obtain the GUIDs for the uploaded files.
In my form I have specified the following control:
<cms:MultiFileUploader ID="fileUploader" runat="server" UploadMode="Grid" Multiselect="true" SourceType="MetaFile" IsInsertMode="true" Width="100%">
<AlternateContent>
<cms:LocalizedLabel ID="lblNoSilverlight" runat="server" ResourceString="fileimport.nosilverlight" CssClass="InfoLabel" />
</AlternateContent>
</cms:MultiFileUploader>
It is specified as a MetaFile and the IsInsertMode is true. Maybe these are not the correct values.
On the code for this site the initialization is as follows:
private void InitializeUploader()
{
var picturesNode = tree.SelectSingleNode(SiteContext.CurrentSiteName, "/LandingPages", "en-US");
string uploadParams = String.Format("NodeID|{0}|DocumentCulture|{1}|IncludeExtension|{2}|NodeGroupID|0", picturesNode.NodeID, "en-US", true);
uploadParams += "|Hash|" + ValidationHelper.GetHashString(uploadParams, false);
string script = String.Format(@"var hdnUploaderOptions = document.getElementById('{0}_hdnUploaderOptions');
if (hdnUploaderOptions) {{
hdnUploaderOptions.value = '{1}';
}}", fileUploader.ClientID, uploadParams);
ScriptHelper.RegisterStartupScript(Page, typeof(string), "UploaderInit", script, true);
}
Am I using correctly the control to upload files? How can I obtain the GUIDs for the uploaded files?
Please help me. I could not find any other answer or further information in the documentation.
Thanks in advance!!
Carlos