Commit 24fc393b authored by l2m2's avatar l2m2

upload.

parent 0e57a898
var httpfunc = require('topsin.httpfunc');
var REQ = httpfunc.argv().request;
var RES = httpfunc.argv().response;
var SinEror = require('topsin.error');
var result = new (require('topsin.responsedata'))();
var DB = require('topsin.database');
var DBNAME = REQ.pathCapture('DBNAME');
var Crypto = require('topsin.crypto');
var _ = require('lodash');
var fs = require("fs");
try {
var cookie_path = "{0}/CI_DONT_REMOVE_ME/dingdingcookie";
cookie_path = _.format(cookie_path, APP.getConfigValue('httpserver.file.storage'));
if (!fs.fileExists(cookie_path)) {
throw "The cookie file does not exist.";
}
var content = fs.readFile(cookie_path);
result.setData(content);
RES.body(result.toJson());
} catch (err) {
result.setErrText(CONFIG.tr(_.toString(err)));
RES.body(result.toJson());
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment