mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 18:18:56 +00:00
fixed header of api fs GET
This commit is contained in:
parent
82ae649480
commit
1543cfcd4c
3 changed files with 24 additions and 21 deletions
|
|
@ -85,6 +85,8 @@ is pressed and current file is directory.
|
|||
|
||||
* Fixed selection style in opera.
|
||||
|
||||
* Fixed header of api fs GET.
|
||||
|
||||
|
||||
2012.03.01, v0.1.9
|
||||
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
- Обработка выделенной корневой директории.
|
||||
- Создание нового файла.
|
||||
- Стиль выделения в Опере.
|
||||
- Заголовок выдачи REST-фукнции fs метода GET.
|
||||
|
||||
**Обновлены:**
|
||||
- jquery до версии v2.0.0
|
||||
|
|
|
|||
|
|
@ -104,31 +104,31 @@
|
|||
if(!pErr){
|
||||
var lSize = CloudFunc.getShortSize(pSize);
|
||||
console.log(lSize);
|
||||
main.sendResponse(pParams, lSize);
|
||||
main.sendResponse(p, lSize);
|
||||
}
|
||||
else
|
||||
main.sendError(pParams, pErr);
|
||||
main.sendError(p, pErr);
|
||||
});
|
||||
else
|
||||
fs.stat(p.name, function(pError, pStat){
|
||||
if(!pError)
|
||||
if( pStat.isDirectory() )
|
||||
main.commander.getDirContent(pParams.name, function(pError, pData){
|
||||
if(!pError){
|
||||
pParams.request.url += '.json';
|
||||
pParams.data = Util.stringifyJSON(pData);
|
||||
main.sendResponse(pParams);
|
||||
}
|
||||
else
|
||||
main.sendError(pParams, pError);
|
||||
});
|
||||
else
|
||||
fs.stat(p.name, function(pError, pStat){
|
||||
if(!pError)
|
||||
if( pStat.isDirectory() )
|
||||
main.commander.getDirContent(p.name, function(pError, pData){
|
||||
if(!pError){
|
||||
p.name += '.json';
|
||||
p.data = Util.stringifyJSON(pData);
|
||||
main.sendResponse(p);
|
||||
}
|
||||
else
|
||||
main.sendError(p, pError);
|
||||
});
|
||||
else
|
||||
main.sendFile(p);
|
||||
else
|
||||
main.sendFile(pParams);
|
||||
else
|
||||
main.sendError(pParams, pError);
|
||||
|
||||
});
|
||||
break;
|
||||
main.sendError(p, pError);
|
||||
|
||||
});
|
||||
break;
|
||||
|
||||
case 'PUT':
|
||||
if(lQuery === 'dir')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue