mirror of
https://github.com/TwidereProject/Twidere-Android
synced 2025-01-19 03:29:58 +01:00
Fix #1150 Receive 422 errors on certain image uploads to Mastodon
This commit is contained in:
parent
45bcfb5bcd
commit
aa105c6d2b
@ -71,6 +71,16 @@ fun AccountDetails.getMediaSizeLimit(@MediaCategory mediaCategory: String? = nul
|
||||
}
|
||||
return UpdateStatusTask.SizeLimit(imageLimit, videoLimit)
|
||||
}
|
||||
AccountType.MASTODON -> {
|
||||
val imageLimit = AccountExtras.ImageLimit().apply {
|
||||
maxSizeSync = 8 * 1024 * 1024
|
||||
maxSizeAsync = 8 * 1024 * 1024
|
||||
maxHeight = 1280
|
||||
maxWidth = 1280
|
||||
}
|
||||
val videoLimit = AccountExtras.VideoLimit.twitterDefault()
|
||||
return UpdateStatusTask.SizeLimit(imageLimit, videoLimit)
|
||||
}
|
||||
else -> return null
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user