有没有办法将任意字符串转换为 Javascript 中的有效文件名?
\n\n结果应尽可能接近原始字符串,以便于人们阅读(因此slugify不是一个选项)。这意味着它只需要替换操作系统不支持的字符。
\n\n例如:
\n\n\'Article: "Un \xc3\xa9l\xc3\xa9phant \xc3\xa0 l\\\'or\xc3\xa9e du bois/An elephant at the edge of the woods".txt\'\n\xe2\x86\x92 \'Article Un \xc3\xa9l\xc3\xa9phant \xc3\xa0 l\\\'or\xc3\xa9e du bois An elephant at the edge of the woods .txt\'\nRun Code Online (Sandbox Code Playgroud)\n\n我认为这将是一个常见问题,但我还没有找到任何解决方案。我希望你可以帮助我!
\n我正在 NodeJS 中使用 Supabase Storage 下载媒体文件(主要是图像)from.download()。
如何将作为文件返回的 Blob 保存在本地硬盘上?