MCPcopy Create free account
hub / github.com/agegr/pi-web / encodeHeaderValue

Function encodeHeaderValue

app/api/files/[...path]/route.ts:260–264  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

258}
259
260function encodeHeaderValue(value: string): string {
261 return encodeURIComponent(value).replace(/[!'()*]/g, (ch) =>
262 `%${ch.charCodeAt(0).toString(16).toUpperCase()}`
263 );
264}
265
266function getContentDisposition(filePath: string, asDownload = false): string {
267 const disposition = asDownload ? "attachment" : "inline";

Callers 1

getContentDispositionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected