Skip to content

Commit

Permalink
Fix download error
Browse files Browse the repository at this point in the history
  • Loading branch information
Leon committed Oct 31, 2023
1 parent 23264d8 commit 0d55d8f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/api/src/handlers/downloads.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ export const download = async (ctx) => {
);
}

const filepath = findLargestFileInPath("/app/data/media/" + decoded.query);
const filepath = findLargestFileInPath(
process.env.OUTPUT_PATH + decoded.query
);
const filename = filepath.split("/").pop();
const file = Bun.file(filepath);
const response = new Response(file);
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ services:
command: sh -c "bun run /app/dist/api.js"
volumes:
- ./:/app
- "$OUTPUT_PATH:/media"
client:
depends_on:
wireguard:
Expand Down

0 comments on commit 0d55d8f

Please sign in to comment.