Unverified Commit 2e627aaa authored by Filipe de Lima Brito's avatar Filipe de Lima Brito Committed by GitHub

Merge pull request #1596 from RocketChat/fix/file-size-validation

[FIX] File size validation
parents b404ba00 5cf023b3
......@@ -338,12 +338,9 @@ class ChatRoomPresenter @Inject constructor(
val maxFileSizeAllowed = settings.uploadMaxFileSize()
when {
fileName.isEmpty() -> {
view.showInvalidFileMessage()
}
fileSize > maxFileSizeAllowed -> {
fileName.isEmpty() -> view.showInvalidFileMessage()
fileSize > maxFileSizeAllowed && maxFileSizeAllowed !in -1..0 ->
view.showInvalidFileSize(fileSize, maxFileSizeAllowed)
}
else -> {
var inputStream: InputStream? = uriInteractor.getInputStream(uri)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment