mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-08-03 05:02:54 +00:00
feature(flop) add write
This commit is contained in:
parent
63cf7b8387
commit
9a6626aca6
4 changed files with 65 additions and 27 deletions
|
|
@ -1,8 +1,7 @@
|
|||
(function(){
|
||||
'use strict';
|
||||
|
||||
var
|
||||
DIR = '../../../',
|
||||
var DIR = '../../../',
|
||||
DIR_SERVER = DIR + 'server/',
|
||||
Util = require(DIR + 'util'),
|
||||
flop = require(DIR_SERVER + 'flop');
|
||||
|
|
|
|||
|
|
@ -15,8 +15,7 @@
|
|||
exports.onPut = onPut;
|
||||
|
||||
function onPut(name, query, readStream, callback) {
|
||||
var options,
|
||||
func = Util.exec.ret(callback),
|
||||
var func = Util.exec.ret(callback),
|
||||
baseName = path.basename(name);
|
||||
|
||||
switch(query) {
|
||||
|
|
@ -33,11 +32,7 @@
|
|||
break;
|
||||
|
||||
default:
|
||||
options = {
|
||||
gunzip : query === 'unzip'
|
||||
};
|
||||
|
||||
pipe.create(readStream, name, options, function(error) {
|
||||
flop.write(name, readStream, 'unzip', function(error) {
|
||||
var msg;
|
||||
|
||||
if (!error)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue