mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 18:18:56 +00:00
added ability save files on Ctrl+S in CodeMirror
This commit is contained in:
parent
4a109f99bb
commit
6539731a8f
4 changed files with 272 additions and 261 deletions
|
|
@ -107,7 +107,7 @@
|
|||
if(lRet){
|
||||
var p = pParams;
|
||||
p.name = Util.removeStr(pParams.name, CloudFunc.FS) || '/';
|
||||
|
||||
console.log(p.name);
|
||||
switch(p.method){
|
||||
case 'GET':
|
||||
fs.stat(p.name, function(pError, pStat){
|
||||
|
|
@ -132,7 +132,6 @@
|
|||
break;
|
||||
|
||||
case 'PUT':
|
||||
console.log(p.request.url);
|
||||
var lQuery = main.getQuery(p.request);
|
||||
p.name = Util.removeStr(p.name, '?dir');
|
||||
|
||||
|
|
@ -152,7 +151,7 @@
|
|||
});
|
||||
|
||||
p.request.on('end', function(){
|
||||
main.sendResponse(pParams, 'file ' + p.name + ' created');
|
||||
main.sendResponse(pParams, 'writed: ' + p.name);
|
||||
});
|
||||
|
||||
//p.request.pipe(process.stdout);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue