Package com.vaadin.flow.component.upload
Enum Class UploadManager.FileRejectionReason
java.lang.Object
java.lang.Enum<UploadManager.FileRejectionReason>
com.vaadin.flow.component.upload.UploadManager.FileRejectionReason
- All Implemented Interfaces:
Serializable,Comparable<UploadManager.FileRejectionReason>,Constable
- Enclosing class:
UploadManager
public static enum UploadManager.FileRejectionReason
extends Enum<UploadManager.FileRejectionReason>
Reasons why a file can be rejected by the upload manager.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe file exceeds the maximum allowed file size.The file type does not match the accepted file types.The maximum number of files has been reached.An unrecognized rejection reason from the client. -
Method Summary
Modifier and TypeMethodDescriptionfromClientCode(String clientCode) Returns the reason matching the given client-side error code, orUNKNOWNif no match is found.Returns the enum constant of this class with the specified name.static UploadManager.FileRejectionReason[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TOO_MANY_FILES
The maximum number of files has been reached. -
FILE_TOO_LARGE
The file exceeds the maximum allowed file size. -
INCORRECT_FILE_TYPE
The file type does not match the accepted file types. -
UNKNOWN
An unrecognized rejection reason from the client.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
fromClientCode
Returns the reason matching the given client-side error code, orUNKNOWNif no match is found.- Parameters:
clientCode- the error code from the client-side upload manager- Returns:
- the matching reason, or
UNKNOWN
-