Browse Source

add sftp addon

mods_upload_support
nils 2 years ago
parent
commit
081e85fa98
3 changed files with 10 additions and 5 deletions
  1. +8
    -3
      CloudronManifest.json
  2. +2
    -2
      backend/routes.js
  3. BIN
      frontend/img/command-block.png

+ 8
- 3
CloudronManifest.json View File

@ -9,7 +9,7 @@
"version": "1.1.0",
"healthCheckPath": "/api/v1/healthcheck",
"tags": [ "game", "multiplayer" ],
"memoryLimit": 1342177280,
"memoryLimit": 2684354560,
"httpPort": 3000,
"tcpPorts": {
"SERVER_PORT": {
@ -26,7 +26,12 @@
"https://s3.amazonaws.com/cloudron-app-screenshots/net.minecraft.cloudronapp/2e986e7d52a3abf2f68cec5704b1717e8d2de8bc/minecraft-01.png"
],
"addons": {
"localstorage": {},
"ldap": {}
"localstorage": {
"ftp": {
"uid": 34,
"uname": "instances"
}
},
"ldap": {}
}
}

+ 2
- 2
backend/routes.js View File

@ -169,7 +169,7 @@ function modsList(req, res, next) {
var _files = files.map(f => {
var iconName = []
switch (path.extname(f)) {
case '.zip' : iconName = 'redstone-dust.png'; break;
case '.zip' : iconName = 'command-block.png'; break;
case undefined : iconName = 'book.png'; break;
default : iconName = 'paper.png'; break;
}
@ -197,7 +197,7 @@ function modsUpload(req, res, next) {
function modsDelete(req, res, next) {
fs.unlink(path.join(modsFolderPath, req.body.fileName), (err) => {
if (err) return next(new HttpError(500, 'error deleting'+req.body.fileName));
if (err) return next(new HttpError(500, 'error deleting '+req.body.fileName));
next(new HttpSuccess(202, {}));
});
}


BIN
frontend/img/command-block.png View File

Before After
Width: 32  |  Height: 32  |  Size: 1.8 KiB

Loading…
Cancel
Save