Skip to content

Commit

Permalink
Merge pull request #112 from simon-liubin/update/IO_putFile_overload
Browse files Browse the repository at this point in the history
 重载putFile方法
  • Loading branch information
longbai committed Jun 10, 2014
2 parents 4508678 + e75974a commit 6435db7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/com/qiniu/api/io/IoApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ public static PutRet Put(String uptoken,String key,InputStream reader,PutExtra e

public static PutRet putFile(String uptoken, String key, String fileName, PutExtra extra) {
File file=new File(fileName);
return putFile(uptoken, key, file, extra);
}

public static PutRet putFile(String uptoken, String key, File file, PutExtra extra) {
if (extra.checkCrc == AUTO_CRC32) {
try {
extra.crc32 = getCRC32(file);
Expand Down

0 comments on commit 6435db7

Please sign in to comment.