Chris,
I am tyring to perform some validation as files are added to reject certain characters in the file name. I am hooking into the FileAdded javascript to do a regex match against it. This so far is working ok, the issue I am having is removing the file from the list if it fails the regex. I also am seeing some issue with the upload getting to 100% but then getting "Upload attempted but no status found" exceptions. I am trying to find out when this is happening since it does not appear to be hitting the page on postback.
I have the following (and I know it is not right):
function FileAdded(file) {
var fname = file.fileName;
var myreg = /^[0-9a-zA-Z\.\(\)-_ ]*$/;
if (!myreg.test(fname)) {
var fs = kw.get('<%=uplArt.ClientID %>');
fs.remove_file(file.id);
}
}
Then the control:
<kw:SlickUpload ID="uplArt" runat="server" MaxFiles="-1" OnUploadComplete="upl_UploadComplete"
OnClientFileAdded="FileAdded">
<DownlevelSelectorTemplate>
<input type="file" />
</DownlevelSelectorTemplate>
<UplevelSelectorTemplate>
<input type="button" value="Add File" />
</UplevelSelectorTemplate>
<FileTemplate>
<div style="padding: 5px; height: 30px;">
...