Skip to content

Commit

Permalink
add width & height to thumb name
Browse files Browse the repository at this point in the history
  • Loading branch information
alaa-yahia committed Oct 23, 2022
1 parent bf6c2f0 commit 58366b7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
Binary file added images/thumb/fjord-thumb-200-400.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion server/routes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ routes.get('/images', async (req, res) => {
const { filename, height, width } = req.query;

const filePath = `images/${filename}.jpg`;
const thumbFilePath = `images/thumb/${filename}-thumb.jpg`;
const thumbFilePath = `images/thumb/${filename}-thumb-${width}-${height}.jpg`;

if (!filename) {
return res.status(400).send('Please provide a file name in URL query');
Expand Down

0 comments on commit 58366b7

Please sign in to comment.