Skip to content

small-tou/readOnlineFile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

readOnlinePic

读取远程图片或者文件并存储到本地

summary

  • 读取远程文件到指定路径并提供回调
  • @param picUrl string 要读取的图片的路径
  • @param targetPath string 目标存储路径,写完整,类型自行判断,无法根据content-type判断,可伪装
  • @param callback function 回调方法,写入完成或者出错的时候回调 callback(info,error)
  • 回调数据 出错时为空对象{},成功时为 { targetPath:targetPath, picUrl:picUrl }
  • @author yutou
  • @email xinyu198736@gmail.com
  • @blog http://www.html-js.com

#install

npm install readof

#clone

$ git clone https://bitbucket.org/xinyu198736/readonlinefile.git/wiki

#code

    var readOF=require("readof");
         readOF.read(pic,target_path,function(error,data){
            //do something
    });
    

About

读取远程图片或者文件并存储到本地

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published