build(release): 加固 v0.1.0 桌面发布链路 (#3)
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
export const getHttpHeaderString = (value: unknown): string | undefined => {
|
||||
if (typeof value === "string") return value;
|
||||
if (Array.isArray(value) && value.every((item) => typeof item === "string")) {
|
||||
return value.join(", ");
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
|
||||
export const getContentDispositionFilename = (header?: string | null): string | null => {
|
||||
if (!header) return null;
|
||||
const encoded = /filename\*\s*=\s*UTF-8''([^;]+)/i.exec(header)?.[1];
|
||||
|
||||
Reference in New Issue
Block a user