URLsafe encoding needs to happen outside of btoa
This commit is contained in:
@ -52,11 +52,11 @@ export async function onRequestGet(context: RequestContext) {
|
||||
`https://mediaproxy.carcrushers.cc/${
|
||||
data.attachments[i]
|
||||
}?Expires=${exp}&KeyName=portal-media-linkgen&Signature=${btoa(
|
||||
String.fromCharCode(...new Uint8Array(signatures[i]))
|
||||
String.fromCharCode(...new Uint8Array(signatures[i])),
|
||||
)
|
||||
.replaceAll("+", "-")
|
||||
.replaceAll("/", "_")
|
||||
.replaceAll("=", ""),
|
||||
)}`,
|
||||
.replaceAll("=", "")}`,
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user