This commit is contained in:
yumoqing 2025-09-04 17:20:44 +08:00
parent 267c7fb0e5
commit f7cc6fe06c

View File

@ -36,7 +36,6 @@ MIME_EXT = {
} }
def getFilenameFromBase64(base64String): def getFilenameFromBase64(base64String):
mimeType = base64String.match(/data:([a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+).*,.*/)
match = re.match(r"data:(.*?);base64,(.*)", base64String) match = re.match(r"data:(.*?);base64,(.*)", base64String)
if not match: if not match:
raise ValueError("不是合法的 base64 Data URL") raise ValueError("不是合法的 base64 Data URL")