Chat export parameter customisation (#7647)
* use export settings and hide fields Signed-off-by: Kerry Archibald <kerrya@element.io> * fix exporter tests Signed-off-by: Kerry Archibald <kerrya@element.io> * test ExportDialog with settings Signed-off-by: Kerry Archibald <kerrya@element.io> * tidy debugs, rename setting to Parameters Signed-off-by: Kerry Archibald <kerrya@element.io> * use reasonable 100gb limit Signed-off-by: Kerry Archibald <kerrya@element.io> * use normal setting instead of UIFeature Signed-off-by: Kerry Archibald <kerrya@element.io> * use a customisation Signed-off-by: Kerry Archibald <kerrya@element.io> * move validateNumberInRange to utils Signed-off-by: Kerry Archibald <kerrya@element.io> * use nullish coalesce Signed-off-by: Kerry Archibald <kerrya@element.io> * use 8gb size limit for customisation Signed-off-by: Kerry Archibald <kerrya@element.io> * update comments Signed-off-by: Kerry Archibald <kerrya@element.io>
This commit is contained in:
parent
ad87ee0a0f
commit
085ecc7f5f
13 changed files with 501 additions and 189 deletions
|
@ -48,7 +48,7 @@ export default abstract class Exporter {
|
|||
protected setProgressText: React.Dispatch<React.SetStateAction<string>>,
|
||||
) {
|
||||
if (exportOptions.maxSize < 1 * 1024 * 1024|| // Less than 1 MB
|
||||
exportOptions.maxSize > 2000 * 1024 * 1024|| // More than ~ 2 GB
|
||||
exportOptions.maxSize > 8000 * 1024 * 1024 || // More than 8 GB
|
||||
exportOptions.numberOfMessages > 10**8
|
||||
) {
|
||||
throw new Error("Invalid export options");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue