add extension name to image file

This commit is contained in:
2024-03-06 06:23:54 -07:00
parent bc05827656
commit 28e9e00998
2 changed files with 1 additions and 3 deletions

View File

@@ -1,10 +1,8 @@
# Image Server # Image Server
Remaining: Remaining:
- parameterize bucket for test server
- try American Cloud - try American Cloud
- dockerize - dockerize
- add file extension
- images.timesafari.app - images.timesafari.app
- pretty-up the client, show thumbnail - pretty-up the client, show thumbnail

View File

@@ -147,7 +147,7 @@ app.post('/image', uploadMulter.single('image'), async (req, res) => {
hashSum.update(data); hashSum.update(data);
const hashHex = hashSum.digest('hex'); const hashHex = hashSum.digest('hex');
const fileName = hashHex; const fileName = hashHex + path.extname(reqFile.originalname);
try { try {