CSV - completely remove, logic moved to plugin

This commit is contained in:
Jan Prochazka
2020-11-22 09:17:51 +01:00
parent 3cdba4339f
commit e23e749cc5
6 changed files with 1 additions and 159 deletions

View File

@@ -2,21 +2,6 @@ const path = require('path');
const { uploadsdir } = require('../utility/directories');
const uuidv1 = require('uuid/v1');
// const extensions = [
// {
// ext: '.xlsx',
// type: 'excel',
// },
// {
// ext: '.jsonl',
// type: 'jsonl',
// },
// {
// ext: '.csv',
// type: 'csv',
// },
// ];
module.exports = {
upload_meta: {
method: 'post',
@@ -31,19 +16,10 @@ module.exports = {
const uploadName = uuidv1();
const filePath = path.join(uploadsdir(), uploadName);
console.log(`Uploading file ${data.name}, size=${data.size}`);
// let storageType = null;
// let shortName = data.name;
// for (const { ext, type } of extensions) {
// if (data.name.endsWith(ext)) {
// storageType = type;
// shortName = data.name.slice(0, -ext.length);
// }
// }
data.mv(filePath, () => {
res.json({
originalName: data.name,
// shortName,
// storageType,
uploadName,
filePath,
});