update origin

This commit is contained in:
solehudin5699
2023-02-19 00:27:41 +07:00
parent 60eae089d7
commit 67481f1d19
3 changed files with 10 additions and 23 deletions
+3 -1
View File
@@ -1,3 +1,5 @@
require('dotenv').config();
const express = require('express');
const path = require('path');
const bodyParser = require('body-parser');
@@ -21,7 +23,7 @@ app.post('/', uploadMiddleware, (req, res) => {
res.json({
success: true,
message: 'Success upload file',
urlImage: `https://img-resize-xxx.herokuapp.com/public/${req.file.filename}`,
urlImage: `${process.env.ORIGIN}/public/${req.file?.filename}`,
});
});