mirror of
https://github.com/mastodon/mastodon-ios.git
synced 2025-02-03 18:57:46 +01:00
chore: set minimal size limit for photo to 1MiB
This commit is contained in:
parent
f784df912d
commit
a45fa65802
@ -97,7 +97,7 @@ extension AttachmentViewModel {
|
||||
extension AttachmentViewModel {
|
||||
@AttachmentViewModelActor
|
||||
func compressImage(data: Data, sizeLimit: SizeLimit) throws -> Output {
|
||||
let maxPayloadSizeInBytes = sizeLimit.image ?? 10 * 1024 * 1024
|
||||
let maxPayloadSizeInBytes = max((sizeLimit.image ?? 10 * 1024 * 1024), 1 * 1024 * 1024)
|
||||
|
||||
guard let image = KFCrossPlatformImage(data: data)?.kf.normalized,
|
||||
var imageData = image.kf.pngRepresentation()
|
||||
|
Loading…
x
Reference in New Issue
Block a user