diff --git a/README.md b/README.md index e879d22..aa361c2 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,8 @@ # Image Server Remaining: -- parameterize bucket for test server - try American Cloud - dockerize -- add file extension - images.timesafari.app - pretty-up the client, show thumbnail diff --git a/server.js b/server.js index 52f5e69..95b2d02 100644 --- a/server.js +++ b/server.js @@ -147,7 +147,7 @@ app.post('/image', uploadMulter.single('image'), async (req, res) => { hashSum.update(data); const hashHex = hashSum.digest('hex'); - const fileName = hashHex; + const fileName = hashHex + path.extname(reqFile.originalname); try {