Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lifegpc committed Jun 2, 2024
1 parent d594036 commit 2454e0c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions routes/api/file/random.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,15 @@ export const handler: Handlers = {
),
),
);
const b = new URLSearchParams();
b.append("verify", verify);
url = `${get_host(req)}/file/${f.id}?${b}`;
if (m.cfg.use_path_based_img_url) {
url = `${get_host(req)}/file/${
encodeURIComponent(verify)
}/${f.id}`;
} else {
const b = new URLSearchParams();
b.append("verify", verify);
url = `${get_host(req)}/file/${f.id}?${b}`;
}
} else {
const t = thumb ? "thumbnail" : "file";
if (m.cfg.random_file_secret) {
Expand Down

0 comments on commit 2454e0c

Please sign in to comment.