Comparing version 0.8.81 to 0.8.82
@@ -91,3 +91,3 @@ { | ||
"name": "febs", | ||
"version": "0.8.81" | ||
"version": "0.8.82" | ||
} |
@@ -717,2 +717,3 @@ febs 库是一些常用的工具的合集; | ||
* @param checkCrc32: 是否检测crc32值, 如果为true则, 请求时需附带crc32参数. | ||
* @param append: 是否追加存储. | ||
* @return Promise. | ||
@@ -722,3 +723,3 @@ * @resolve | ||
*/ | ||
febs.upload.accept(ctx, conditionCB, checkCrc32=true) | ||
febs.upload.accept(ctx, conditionCB, checkCrc32=true, append=false) | ||
``` | ||
@@ -725,0 +726,0 @@ |
@@ -167,3 +167,3 @@ 'use strict'; | ||
*/ | ||
exports.accept = function(app, conditionCB, checkCrc32=true) | ||
exports.accept = function(app, conditionCB, checkCrc32=true, append=true) | ||
{ | ||
@@ -239,3 +239,9 @@ assert(conditionCB); | ||
// create stream. | ||
destStream = fs.createWriteStream(fn); | ||
if (append) { | ||
destStream = fs.createWriteStream(fn, {flags: 'a'}); | ||
} | ||
else { | ||
destStream = fs.createWriteStream(fn); | ||
} | ||
if (!destStream) | ||
@@ -242,0 +248,0 @@ { |
@@ -1099,2 +1099,3 @@ // Type definitions for febs | ||
* @param checkCrc32: 是否检测crc32值, 如果为true则, 请求时需附带crc32参数. | ||
* @param append: 是否追加存储. | ||
* @return Promise. | ||
@@ -1104,3 +1105,3 @@ * @resolve | ||
*/ | ||
function accept(app: any, conditionCB: (data: any, filesize: number, filename: string, filemimeType: string) => Promise<string>, checkCrc32?:boolean): Promise<boolean>; | ||
function accept(app: any, conditionCB: (data: any, filesize: number, filename: string, filemimeType: string) => Promise<string>, checkCrc32?:boolean, append?:boolean): Promise<boolean>; | ||
@@ -1107,0 +1108,0 @@ /** |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8218393
86235
904