Update file size limit for onion requests

This commit is contained in:
nielsandriesse 2020-07-31 16:23:40 +10:00
parent 1d4a3bbe08
commit 38db29c20d

View File

@ -22,26 +22,26 @@ public class PushMediaConstraints extends MediaConstraints {
@Override
public int getImageMaxSize(Context context) {
return FileServerAPI.Companion.getMaxFileSize();
return (int) (((double) FileServerAPI.Companion.getMaxFileSize()) / FileServerAPI.Companion.getFileSizeORMultiplier());
}
@Override
public int getGifMaxSize(Context context) {
return FileServerAPI.Companion.getMaxFileSize();
return (int) (((double) FileServerAPI.Companion.getMaxFileSize()) / FileServerAPI.Companion.getFileSizeORMultiplier());
}
@Override
public int getVideoMaxSize(Context context) {
return FileServerAPI.Companion.getMaxFileSize();
return (int) (((double) FileServerAPI.Companion.getMaxFileSize()) / FileServerAPI.Companion.getFileSizeORMultiplier());
}
@Override
public int getAudioMaxSize(Context context) {
return FileServerAPI.Companion.getMaxFileSize();
return (int) (((double) FileServerAPI.Companion.getMaxFileSize()) / FileServerAPI.Companion.getFileSizeORMultiplier());
}
@Override
public int getDocumentMaxSize(Context context) {
return FileServerAPI.Companion.getMaxFileSize();
return (int) (((double) FileServerAPI.Companion.getMaxFileSize()) / FileServerAPI.Companion.getFileSizeORMultiplier());
}
}