MaxFileSize and client validation message before upload to server

Welcome to Wisej Support.
Questions, suggestions and plain old bugs - are all welcome here!
0
0

Hi

I think MaxFileSize of UploadControl is validated in client/browser before upload to server.

How to display a message to the client when “file size too large”,

I have this code:

uploadPhoto.CreateControl();
uploadPhoto.AllowedFileTypes = “.png”;
uploadPhoto.MaxFileSize = 25000;
btnSelPicture.Eval(
String.Format(@”
this.uploadButton = Wisej.Core.getComponent(“”id_{0}””);
this.addListener(“”execute””, function(e)
{{
this.uploadButton.upload();
}});”, this.uploadPhoto.Handle));

 

Thanks in advance!

  • You must to post comments
0
0

Hi Ser,

enhancement WJ-7934 has been added to the latest build (1.3.22).

Now you can handle the Error event of an Upload Control and will receive information about the files and their sizes that exceed the MaxFileSize.

The ErrorType in that case is FileTooLarge.

Best regards
Frank

  • You must to post comments
0
0

At the moment no. I have added an enhancement request to fire a server event with the list of files skipped.

  • You must to post comments
Showing 2 results
Your Answer
Post as a guest by filling out the fields below or if you already have an account.
Name*
E-mail*
Attachment
File Name Size
There are currently no files uploaded.
Maximum number of files 5, maximum file size 3.9MB.
Supported file formats: zip pdf gif jpg bmp png cs vb theme json