mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-05 23:10:28 +00:00
Rename upload manager to multipart form manager
This commit is contained in:
parent
5fe41fc896
commit
1a28ec7ea4
@ -26,14 +26,14 @@ exports.startup = function() {
|
||||
databasePath: path.resolve($tw.boot.wikiPath,"store/database.sqlite"),
|
||||
engine: $tw.wiki.getTiddlerText("$:/config/MultiWikiServer/Engine","better") // better || wasm
|
||||
}),
|
||||
UploadManager = require("$:/plugins/tiddlywiki/multiwikiserver/upload-manager.js").UploadManager,
|
||||
uploadManager = new UploadManager({
|
||||
MultipartFormManager = require("$:/plugins/tiddlywiki/multiwikiserver/multipart-form-manager.js").MultipartFormManager,
|
||||
multipartFormManager = new MultipartFormManager({
|
||||
inboxPath: path.resolve($tw.boot.wikiPath,"store/inbox"),
|
||||
store: store
|
||||
});
|
||||
$tw.mws = {
|
||||
store: store,
|
||||
uploadManager: uploadManager
|
||||
multipartFormManager: multipartFormManager
|
||||
};
|
||||
// Performance timing
|
||||
console.time("mws-initial-load");
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*\
|
||||
title: $:/plugins/tiddlywiki/multiwikiserver/upload-manager.js
|
||||
title: $:/plugins/tiddlywiki/multiwikiserver/multipart-form-manager.js
|
||||
type: application/javascript
|
||||
module-type: library
|
||||
|
||||
@ -18,7 +18,7 @@ Create an instance of the upload manager. Options include:
|
||||
inboxPath - path to the inbox folder
|
||||
store - sqlTiddlerStore to use for saving tiddlers
|
||||
*/
|
||||
function UploadManager(options) {
|
||||
function MultipartFormManager(options) {
|
||||
const path = require("path");
|
||||
options = options || {};
|
||||
this.inboxPath = path.resolve(options.inboxPath,);
|
||||
@ -49,7 +49,7 @@ formData is:
|
||||
]
|
||||
}
|
||||
*/
|
||||
UploadManager.prototype.processNewStream = function(options) {
|
||||
MultipartFormManager.prototype.processNewStream = function(options) {
|
||||
let fileStream = null;
|
||||
let fieldValue = "";
|
||||
state.streamMultipartData({
|
||||
@ -87,9 +87,9 @@ UploadManager.prototype.processNewStream = function(options) {
|
||||
});
|
||||
}
|
||||
|
||||
UploadManager.prototype.close = function() {
|
||||
MultipartFormManager.prototype.close = function() {
|
||||
};
|
||||
|
||||
exports.UploadManager = UploadManager;
|
||||
exports.MultipartFormManager = MultipartFormManager;
|
||||
|
||||
})();
|
Loading…
Reference in New Issue
Block a user