I'm using sfUploader (20.2.0.43)
<SfUploader ID="UploadFiles" AllowedExtensions=".xls, .xlsx" AllowMultiple="false">
<UploaderEvents ValueChange="OnChange"></UploaderEvents>
</SfUploader>
I have , in code, a check for a specific filename (example.xlsx) and if the file trying to be uploaded is not named example.xlsx, it does not get uploaded. (so far so good). My issue is that it still displays that the file was uploaded successfully. I tried changing the file.FileInfo.Status but that does not work. Can you tell me how I can do this?
if (file.FileInfo.Name != "example.xlsx")
{
file.FileInfo.Status = "Could Not Upload File. Incorrect File Name.";
file.FileInfo.StatusCode = "Failed";
}
else
{
continue with upload.......
}