We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 31309cd commit 46f4ff8Copy full SHA for 46f4ff8
lib/storage/index.ts
@@ -271,7 +271,7 @@ export async function initializeStorage() {
271
}
272
273
function createLocalDownloadUrl(objectName: string) {
274
- return `${ENV.API_BASE_URL}/download/${randomBytes(64).toString('base64')}/${objectName}`
+ return `${ENV.API_BASE_URL}/download/${randomBytes(64).toString('hex')}/${objectName}`
275
276
277
export function useStorageAdapter() {
routes/download/[random]/[objectName].ts
@@ -4,7 +4,6 @@ import { useStorageAdapter } from '~/lib/storage'
4
5
const pathParamsSchema = z.object({
6
objectName: z.string(),
7
- hash: z.string(),
8
})
9
10
export default defineEventHandler(async (event) => {
0 commit comments