refract: simpler upload

- also reverting deleting the file that is uploaded
This commit is contained in:
cv
2021-06-08 23:26:18 +02:00
parent 65558e657e
commit d255edebd4
3 changed files with 39 additions and 30 deletions
@@ -115,6 +115,9 @@ const upload = async (file, req, res) => {
const rawdata = fs.readFileSync(file);
const uploadedJson = JSON.parse(rawdata);
// delete file
deleteFile(file);
// check version
if (uploadedJson.settings.version === 1) parsev1(uploadedJson);
else {