update for upload name check

This commit is contained in:
Mohamed Nouffer
2021-09-02 15:25:24 +05:30
parent 29b8b4c12e
commit f811aa9bf4
8 changed files with 16 additions and 13 deletions

View File

@ -27,7 +27,10 @@ function Uploader() {
const data = new FormData()
data.append('file', file);
const chk = file.name.trim();
if(chk === 'ini_工程内検査票.xlsx' || chk === 'ini_データ入力シート.xlsx')
const collator = new Intl.Collator('ja');
const order1 = collator.compare('ini_工程内検査票.xlsx', chk);
const order2 = collator.compare('ini_データ入力シート.xlsx', chk);
if(order1 === 0 || order2 === 0)
{
axios.post("https://fsbsso.sumasen.net/upload", data, { // receive two parameter endpoint url ,form data
})