update wizard relation db store procedure parameter(erase _)
This commit is contained in:
@@ -64,7 +64,12 @@ app.post(ormRoutes, async (req, res, next) => {
|
||||
|
||||
app.post('/upload/:dbname/:typeid', upload.single('file'), (req, res) => {
|
||||
if (!req.file) return res.status(400).json({ status: 400, msg: 'No file' });
|
||||
const fileUrl = `/static/upload/${req.params.dbname}/${req.params.typeid}/${req.file.filename}`;
|
||||
//const fileUrl = `/static/upload/${req.params.dbname}/${req.params.typeid}/${req.file.filename}`;
|
||||
|
||||
// 改為完整的 Server IP
|
||||
const serverRoot = 'https://api.gex.com.tw:8033/upload';
|
||||
const fileUrl = `${serverRoot}/${req.params.dbname}/${req.params.typeid}/${req.file.filename}`;
|
||||
|
||||
res.json({ status: 0, data: { value: fileUrl, url: fileUrl }, msg: 'success' });
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user