|
@@ -25,8 +25,11 @@ public class FastDFSClient {
|
|
|
public static String[] upload(FastDFSFile file) {
|
|
|
logger.info("File Name: " + file.getName() + "File Length:" + file.getContent().length);
|
|
|
|
|
|
- NameValuePair[] meta_list = new NameValuePair[1];
|
|
|
- meta_list[0] = new NameValuePair("author", file.getAuthor());
|
|
|
+ // 设置元信息
|
|
|
+ NameValuePair[] meta_list = new NameValuePair[3];
|
|
|
+ meta_list[0] = new NameValuePair("name", file.getName());
|
|
|
+ meta_list[1] = new NameValuePair("ext", file.getExt());
|
|
|
+ meta_list[2] = new NameValuePair("author", file.getAuthor());
|
|
|
|
|
|
long startTime = System.currentTimeMillis();
|
|
|
String[] uploadResults = null;
|