how to tell if a string is base64 or not

前端 未结 6 538
春和景丽
春和景丽 2021-01-03 01:10

I have many emails coming in from different sources. they all have attachments, many of them have attachment names in chinese, so these names are converted to base64 by thei

6条回答
  •  一向
    一向 (楼主)
    2021-01-03 01:53

    Well, you parse the email header into a dictionary. And then you check if Content-Transfer-Encoding is set, and if it = "base64" or "base-64".

提交回复
热议问题