(path: string, prefix: string | undefined, id: string)
| 45 | } |
| 46 | |
| 47 | export function buildKey(path: string, prefix: string | undefined, id: string): string { |
| 48 | const name = basename(path); |
| 49 | const normalised = normalisePrefix(prefix); |
| 50 | return normalised.length > 0 ? `${normalised}/${id}/${name}` : `${id}/${name}`; |
| 51 | } |
| 52 | |
| 53 | // RFC 6266 Content-Disposition. The filename is quoted; embedded |
| 54 | // quotes and backslashes are escaped. Non-ASCII filenames also get |
no test coverage detected