You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/blob/src/client.ts
+15-14Lines changed: 15 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ export const put = createPutMethod<ClientPutCommandOptions>({
22
22
extraChecks(options: ClientPutCommandOptions){
23
23
if(typeofwindow==='undefined'){
24
24
thrownewBlobError(
25
-
'client/`put` must be called from a client environment',
25
+
'client/`put` must be called from a client environment'
26
26
);
27
27
}
28
28
@@ -37,7 +37,7 @@ export const put = createPutMethod<ClientPutCommandOptions>({
37
37
options.cacheControlMaxAge!==undefined
38
38
){
39
39
thrownewBlobError(
40
-
'addRandomSuffix and cacheControlMaxAge are not supported in client uploads. Configure these options at the server side when generating client tokens.',
40
+
'addRandomSuffix and cacheControlMaxAge are not supported in client uploads. Configure these options at the server side when generating client tokens.'
'addRandomSuffix and cacheControlMaxAge are not supported in client uploads. Configure these options at the server side when generating client tokens.',
98
+
'addRandomSuffix and cacheControlMaxAge are not supported in client uploads. Configure these options at the server side when generating client tokens.'
99
99
);
100
100
}
101
101
},
@@ -115,13 +115,13 @@ async function importKey(token: string): Promise<CryptoKey> {
115
115
newTextEncoder().encode(token),
116
116
{name: 'HMAC',hash: 'SHA-256'},
117
117
false,
118
-
['sign','verify'],
118
+
['sign','verify']
119
119
);
120
120
}
121
121
122
122
asyncfunctionsignPayload(
123
123
payload: string,
124
-
token: string,
124
+
token: string
125
125
): Promise<string|undefined>{
126
126
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Node.js < 20: globalThis.crypto is undefined (in a real script.js, because the REPL has it linked to the crypto module). Node.js >= 20, Browsers and Cloudflare workers: globalThis.crypto is defined and is the Web Crypto API.
0 commit comments