Hi,
The problem is in Upload control which does not check whether the file has already been uploaded or not before proceeding to the next step.
You could modify
~\CMSFormControls\Basic\UploadControl.ascx.cs file in a following way:
- add this code snippet at the end of
OnInit() method:
// check if file not already uploaded
if (String.IsNullOrEmpty(ValidationHelper.GetString(Value, "")))
{
this.Controls.Add(uploader);
}
- globally add
Uploader uploader = new Uploader();
- delete
<cms:Uploader ID="uploader" runat="server" />
from markup (.ascx file)
The only disadvantage is that after you upload the file, button disappears and you cannot change it back but modifying such behavior would require Source code and code adjustments which are delivered as .dll assemblies in standard Kentico CMS projects.
Best regards,
Filip Ligac