Browse Source

add extension name to image file

pull/1/head
Trent Larson 7 months ago
parent
commit
28e9e00998
  1. 2
      README.md
  2. 2
      server.js

2
README.md

@ -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

2
server.js

@ -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 {

Loading…
Cancel
Save