add extension name to image file
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user