Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(connect): always send useSignedUrl query param on storage.signedUrl #596

Merged
merged 1 commit into from
May 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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