attach 上传, 下载, ok

This commit is contained in:
life
2015-05-01 17:23:56 +08:00
parent 3d8f55ab51
commit f868bd3c10
2 changed files with 51 additions and 44 deletions

4
src/node_modules/file.js generated vendored
View File

@@ -452,10 +452,10 @@ var File = {
// 附件操作
addAttach: function(filePaths, noteId, callback) {
if(!noteId || !filePaths) {
if(!noteId || !filePaths || filePaths.length == 0) {
return callback && callback(false);
}
filePaths = filePaths.split(';');
// filePaths = filePaths.split(';');
// 复制每一个文件, 保存到数据库中
var targets = [];
for(var i in filePaths) {