update upload
This commit is contained in:
@ -68,7 +68,7 @@ function callInitFileMover(req, res) {
|
|||||||
if(data !== 'no match'){
|
if(data !== 'no match'){
|
||||||
resdata = JSON.parse(data);
|
resdata = JSON.parse(data);
|
||||||
console.log(resdata);
|
console.log(resdata);
|
||||||
//callLoadInitializeData(req, res, resdata);
|
callLoadInitializeData(req, res, resdata);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
@ -102,7 +102,7 @@ app.post('/upload', function(req, res, next) {
|
|||||||
return res.status(500).json(err)
|
return res.status(500).json(err)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var FileName = req.file.filename;
|
var FileName = req.files[0].filename;
|
||||||
callInitFileMover(req, res);
|
callInitFileMover(req, res);
|
||||||
res.status(200).send(FileName);
|
res.status(200).send(FileName);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,11 +32,11 @@ function Uploader(props) {
|
|||||||
const order2 = collator.compare('ini_データ入力シート.xlsx', chk);
|
const order2 = collator.compare('ini_データ入力シート.xlsx', chk);
|
||||||
if(order1 === 0 || order2 === 0)
|
if(order1 === 0 || order2 === 0)
|
||||||
{
|
{
|
||||||
axios.post("https://fsbsso.sumasen.net/upload?email=" + props.email, {
|
// axios.post("https://fsbsso.sumasen.net/upload?email=" + props.email, {
|
||||||
body: data,
|
// body: data,
|
||||||
headers: {'Content-Type': 'multipart/form-data' }
|
// headers: {'Content-Type': 'multipart/form-data' }
|
||||||
})
|
// })
|
||||||
//axios.post("http://localhost:8000/upload", data, headers: {'Content-Type': 'multipart/form-data' })
|
axios.post("https://fsbsso.sumasen.net/upload?email=" + props.email, data, headers: {'Content-Type': 'multipart/form-data' })
|
||||||
.then(res => { // then print response status
|
.then(res => { // then print response status
|
||||||
//console.log(res.statusText)
|
//console.log(res.statusText)
|
||||||
if (res.statusText == 'OK') {
|
if (res.statusText == 'OK') {
|
||||||
|
|||||||
Reference in New Issue
Block a user