|
|
@ -466,7 +466,7 @@ public class SignalAttachment: NSObject {
|
|
|
|
return nil
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
let dataSource = DataSourceValue.dataSource(with:data, utiType: dataUTI)
|
|
|
|
let dataSource = DataSourceValue.dataSource(with:data, utiType: dataUTI)
|
|
|
|
// Pasted images should not be resized, if possible.
|
|
|
|
// Pasted images _SHOULD _NOT_ be resized, if possible.
|
|
|
|
return imageAttachment(dataSource : dataSource, dataUTI : dataUTI, attachmentQuality:.original)
|
|
|
|
return imageAttachment(dataSource : dataSource, dataUTI : dataUTI, attachmentQuality:.original)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -664,7 +664,6 @@ public class SignalAttachment: NSObject {
|
|
|
|
|
|
|
|
|
|
|
|
guard let dataSource = DataSourceValue.dataSource(with:jpgImageData, fileExtension:"jpg") else {
|
|
|
|
guard let dataSource = DataSourceValue.dataSource(with:jpgImageData, fileExtension:"jpg") else {
|
|
|
|
attachment.error = .couldNotConvertToJpeg
|
|
|
|
attachment.error = .couldNotConvertToJpeg
|
|
|
|
Logger.verbose("\(TAG) Could not convert \(attachment.mimeType) to image/jpeg")
|
|
|
|
|
|
|
|
return attachment
|
|
|
|
return attachment
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -695,7 +694,6 @@ public class SignalAttachment: NSObject {
|
|
|
|
imageUploadQuality = .low
|
|
|
|
imageUploadQuality = .low
|
|
|
|
case .low:
|
|
|
|
case .low:
|
|
|
|
attachment.error = .fileSizeTooLarge
|
|
|
|
attachment.error = .fileSizeTooLarge
|
|
|
|
Logger.verbose("\(TAG) Image too large to convert \(attachment.mimeType) to image/jpeg")
|
|
|
|
|
|
|
|
return attachment
|
|
|
|
return attachment
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|