update upload file check
This commit is contained in:
@ -26,9 +26,9 @@ function Uploader() {
|
||||
function onClickHandler(e) {
|
||||
const data = new FormData()
|
||||
data.append('file', file);
|
||||
//console.log(file);
|
||||
console.log('calling upload');
|
||||
axios.post("https://fsbsso.sumasen.net/upload", data, { // receive two parameter endpoint url ,form data
|
||||
if(file.name === 'ini_工程内検査票.xlsx' || file.name === 'ini_データ入力シート.xlsx')
|
||||
{
|
||||
axios.post("https://fsbsso.sumasen.net/upload", data, { // receive two parameter endpoint url ,form data
|
||||
})
|
||||
.then(res => { // then print response status
|
||||
//console.log(res.statusText)
|
||||
@ -36,6 +36,14 @@ function Uploader() {
|
||||
alert("正常にアップロードされました");
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
alert("ファイル名をアップロード" + file.name + "間違っている。名前を変更する必要があります ini_工程内検査票.xlsx また ini_データ入力シート.xlsx");
|
||||
return
|
||||
}
|
||||
//console.log(file.name);
|
||||
//console.log('calling upload');
|
||||
|
||||
}
|
||||
|
||||
return ( <
|
||||
|
||||
Reference in New Issue
Block a user