Software: Apache. PHP/5.3.29 uname -a: Linux tardis23.nocplanet.net 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024
Safe-mode: OFF (not secure) /home/memoriacel/public_html/2018/panel/FileAPI-master/node/ drwxr-xr-x | |
| Viewing file: Select action/file-type: var express = require('express');
var busboy = require('connect-busboy');
var fileApi = require('./file-api');
var app = express();
app.use(express.static('.', {index: 'index.html'}));
app.use(function (req, res, next) {
// Enable CORS for non static files
var origin = req.get('Origin');
if (origin) {
res.set({
'Access-Control-Allow-Origin': origin,
'Access-Control-Allow-Methods': 'POST, GET, OPTIONS',
'Access-Control-Allow-Headers': 'Origin, X-Requested-With, Content-Range, Content-Disposition, Content-Type',
'Access-Control-Allow-Credentials': 'true'
});
}
next();
});
var uploadPath = '/upload';
app.options(uploadPath, function (req, res) {
res.end();
});
app.post(uploadPath, busboy({immediate: true}), fileApi(), function (req, res) {
var jsonp = req.query.callback || null;
res[jsonp ? 'jsonp' : 'json']({
status: 200,
statusText: 'OK',
images: req.body.images
});
});
var server = app.listen(8000, function () {
var host = server.address().address;
var port = server.address().port;
console.log('Test server listening at http://%s:%s', host, port)
});
|
:: Command execute :: | |
--[ c99shell v.2.1 [PHP 7 Update] [1.12.2019] maintained by KaizenLouie and updated by cermmik | C99Shell Github (MySQL update) | Generation time: 0.0244 ]-- |