fdfs
fdfs copied to clipboard
FastDFS nodejs client
在web应用中,可能需要获取文件完成的buffer数据或者直接作为http请求的响应。 目前看没有直接的方法可以提供需要。 使用target作为http.ServerResponse不可用。原有使用isStream做检查,检查项必须是写流。而http.ServerResponse是流。 所以在原有基础上添加了一个fetchBuffer方法,获取文件所有的buffer数据。
fdfs can set store_path_index to save
receive command: 32 is not equal to the expected command: 100 是客户端问题还是fastdfs部署的tracker或store server的问题
当在vue中引用此包,进行调用时,出现如下问题: ``` TypeError: fs.statSync is not a function at fdfs.js:346 at _normalizeUploadParams (fdfs.js:296) at FdfsClient../node_modules/fdfs/lib/fdfs.js.FdfsClient.upload (fdfs.js:156) at VueComponent.uploadLocalFile (index.vue?f948:78) at boundFn (vue.esm.js:188) at VueComponent.invoker (vue.esm.js:1997) at VueComponent.Vue.$emit (vue.esm.js:2507) at VueComponent.handleClick...
招高级node.js,base上海。
fdfs.upload('e:/shou.jpg').then(function(fileId) { // fileId 为 group + '/' + filename console.log(fileId); }).catch(function(err) { console.error(err); ); //cache function error, no }
在单个tracker时uploadAppender、append没什么问题,有多个tracker时就会报错了。 
当我在调用upload append模式时首次添加数据后再调研append追加 反回的storage与首次上传的文件storage不是同一个,导致出现错误 如下 receive server packet headerBuffer: {"type":"Buffer","data":[0,0,0,0,0,0,0,0,100,2]} { Error: receive packet errno is: 2 at _parseHeader (server\node_modules\fdfs\lib\protocol.js:334:19) at Socket.listener (node_modules\fdfs\lib\protocol.js:183:34) at emitOne (events.js:96:13) at Socket.emit (events.js:188:7) at readableAddChunk...
没有发现可以支持从文件的上传方法。有`STORAGE_PROTO_CMD_UPLOAD_SLAVE_FILE`这个命令声明却没有对应的方法?或者有没有相应的思路?