fix 500 on project/*
This commit is contained in:
parent
64e780b7af
commit
e4f08d0778
|
@ -26,7 +26,8 @@ config = {
|
|||
host: DB_HOSTNAME || config.host,
|
||||
define: {
|
||||
timestamps: false
|
||||
}
|
||||
},
|
||||
logging: false
|
||||
};
|
||||
|
||||
/** @type Sequelize */
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
import { Terminal } from 'xterm';
|
||||
import { saveAs } from 'file-saver';
|
||||
const fs = require('../fs');
|
||||
|
||||
/**
|
||||
*
|
||||
* @param { string[] } argv
|
||||
* @param { Terminal } terminal
|
||||
*/
|
||||
module.exports = (argv, terminal) => {
|
||||
|
||||
if (argv.indexOf('--help') != -1) {
|
||||
terminal.write(
|
||||
`Usage: ${argv[0]} [DESTANATION]\n
|
||||
Import files from your system to this filesystem.
|
||||
`
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
let el = document.getElementById('upload_file_btn');
|
||||
if (el == null) {
|
||||
el = document.createElement('input');
|
||||
el.style.display = 'none';
|
||||
el.type = 'file';
|
||||
el.id = 'upload_file_btn';
|
||||
el.setAttribute('multiple', 'multiple');
|
||||
document.body.appendChild(el);
|
||||
}
|
||||
|
||||
const dir = argv[1] || '.';
|
||||
|
||||
el.click();
|
||||
|
||||
let files = el.files;
|
||||
global.f = files
|
||||
}
|
|
@ -8,6 +8,7 @@ let cmds = {
|
|||
'mkdir': require('./mkdir'),
|
||||
'wget': require('./wget'),
|
||||
'export_file': require('./export_file'),
|
||||
'import_file': require('./import_file'),
|
||||
|
||||
// alias l='ls -l'
|
||||
'l': (a,t) => {require('./ls')([...a, '-l'], t)},
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
const handler = require('express-async-handler');
|
||||
const Helpers = require('../helpers');
|
||||
|
||||
async function project(req, res) {
|
||||
res.template(
|
||||
|
|
Loading…
Reference in New Issue