Interface MediaConstraints
public interface MediaConstraints
Project Media-Constraints settings. project level based media restrictions based on file size and/or file extension.
- Since:
- 4.1
-
Method Summary
Modifier and TypeMethodDescriptionGet the allowed file name extensions.long
Get the project wide maximum file size for non image files in byte.long
Get the project wide maximum image size setting in byte.void
setAllowedExtensions
(Set<String> value) Set the allowed file name extensions.void
setMaxFileSize
(long value) Set the project wide maximum file size setting for non image files in byte.void
setMaxImageSize
(long value) Set the project wide maximum image(file) size setting in byte.
-
Method Details
-
getMaxFileSize
long getMaxFileSize()Get the project wide maximum file size for non image files in byte.- Returns:
- the maximum size for files (non image files) in byte or -1 if no limit is set
- Since:
- 4.1
- See Also:
-
setMaxFileSize
void setMaxFileSize(long value) Set the project wide maximum file size setting for non image files in byte.- Parameters:
value
- the maximum file size in byte- Since:
- 4.1
- See Also:
-
getMaxImageSize
long getMaxImageSize()Get the project wide maximum image size setting in byte.- Returns:
- the max size for image files in byte or -1 if no limit is set
- Since:
- 4.1
- See Also:
-
setMaxImageSize
void setMaxImageSize(long value) Set the project wide maximum image(file) size setting in byte.- Parameters:
value
- in byte- Since:
- 4.1
- See Also:
-
getAllowedExtensions
Get the allowed file name extensions. The returned set is read only. The file name extensions check is case-sensitive.- Returns:
- the Set<String> containing all allowed file name extensions
- Since:
- 4.1
- See Also:
-
setAllowedExtensions
Set the allowed file name extensions. The provided set is copied.
Enable by settingProject.setMediaExtensionCheckEnabled(boolean)
totrue
. The file name extensions check is case-sensitive.- Parameters:
value
- a set containing the fileName extensions- Since:
- 4.1
- See Also:
-