it seems that Ivan's realization of recognizing inline attachments works well. Just need to fix the Android side.

MsgBlock.Type.DECRYPTED_ATT-> {
if (tempDir !=null) {
try {
val decryptedAtt:DecryptedAttMsgBlock= block asDecryptedAttMsgBlockval fileName =FileAndDirectoryUtils.normalizeFileName(decryptedAtt.attMeta.name)
val file =if (fileName.isNullOrEmpty()) {
File.createTempFile("tmp", null, tempDir)
} else {
val file =File(tempDir, fileName)
if (file.exists()) {
FileAndDirectoryUtils.createFileWithIncreasedIndex(tempDir, fileName)
} else {
file
}
}
FileUtils.writeByteArrayToFile(
file,
Base64.decode(decryptedAtt.attMeta.data, Base64.DEFAULT)
)
decryptedAtt.attMeta.data =null//clear raw info to prevent Binder exception
decryptedAtt.fileUri =Uri.fromFile(file)
msgBlocks?.add(decryptedAtt)
} catch (e:Exception) {
e.printStackTrace()
ExceptionUtil.handleError(e)
}
} else {
ExceptionUtil.handleError(IOException("The temp cache dir == null"))
}
}ref
| MsgBlock.Type.DECRYPTED_ATT-> { |
it seems that Ivan's realization of recognizing inline attachments works well. Just need to fix the Android side.
ref
flowcrypt-android/FlowCrypt/src/main/java/com/flowcrypt/email/api/retrofit/response/node/ParseDecryptedMsgResult.kt
Line 79 in 68d4a88