Skip to content

Commit

Permalink
fix(connect): always send useSignedUrl query param on storage.signedUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
TillaTheHun0 committed May 24, 2023
1 parent bbd810b commit ae71eae
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/connect/deno/services/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const signedUrl =
service,
resource: name,
method: options.type === 'download' ? Method.GET : Method.POST,
...(options.type === 'download' ? { params: { useSignedUrl: true } } : {}),
params: { useSignedUrl: true },
})

export const remove = (name: string) => (h: HyperRequestFunction) =>
Expand Down
1 change: 1 addition & 0 deletions packages/connect/deno/tests/storage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ test('storage.signedUrl(upload)', async () => {
assertEquals(h.service, 'storage')
assertEquals(h.method, 'POST')
assertEquals(h.body, undefined)
assertEquals(h.params, { useSignedUrl: true })

return Promise.resolve(
new Request(`http://localhost/${h.service}/bucket/${h.resource}`, {
Expand Down
7 changes: 4 additions & 3 deletions packages/connect/node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ Some tests for verifying `hyper-connect` works in Node

## Getting Started

First, you will need to set the `HYPER` environment variable to a valid Hyper Cloud connection string
First, you will need to set the `HYPER` environment variable to a valid Hyper Cloud connection
string

`deno task test:integration` from the root will transform the Deno code into Node code, and then run the
unit tests and integration tests for node.
`deno task test:integration` from the root will transform the Deno code into Node code, and then run
the unit tests and integration tests for node.

You can run `yarn && yarn test` here as well, but you must first transform the Deno code into Node
code using `deno task to-node`
Expand Down

0 comments on commit ae71eae

Please sign in to comment.