mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-10 14:44:40 +02:00
* Add FileBaseFilters
* Add HTTP(S) file web server with temp URLs * Get temp web d/l from file list * Add File area filter editor (all file area stuff will be rename to file "base" later) * Concept of "listening servers" vs "login servers" * Ability to get servers by their package name * New MCI: %FN: File Base active filter name * Some ES6 updates * VC resetInitialFocus() to set focus to explicit/detected initial focus field * Limit what is dumped out when logging form data
This commit is contained in:
parent
712cf512f0
commit
a7c0f2b7b0
22 changed files with 1233 additions and 286 deletions
|
@ -3,11 +3,13 @@
|
|||
|
||||
const fileDb = require('./database.js').dbs.file;
|
||||
const Errors = require('./enig_error.js').Errors;
|
||||
const getISOTimestampString = require('./database.js').getISOTimestampString;
|
||||
const getISOTimestampString = require('./database.js').getISOTimestampString;
|
||||
const Config = require('./config.js').config;
|
||||
|
||||
// deps
|
||||
const async = require('async');
|
||||
const _ = require('lodash');
|
||||
const paths = require('path');
|
||||
|
||||
const FILE_TABLE_MEMBERS = [
|
||||
'file_id', 'area_tag', 'file_sha1', 'file_name',
|
||||
|
@ -130,6 +132,17 @@ module.exports = class FileEntry {
|
|||
);
|
||||
}
|
||||
|
||||
get filePath() {
|
||||
const areaInfo = Config.fileAreas.areas[this.areaTag];
|
||||
if(areaInfo) {
|
||||
return paths.join(
|
||||
Config.fileBase.areaStoragePrefix,
|
||||
areaInfo.storageDir || '',
|
||||
this.fileName
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
static persistMetaValue(fileId, name, value, cb) {
|
||||
fileDb.run(
|
||||
`REPLACE INTO file_meta (file_id, meta_name, meta_value)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue