FastDFS工具类
fastdfs-client-java
上传图片
@Test
public void testFastDfsClient() throws Exception {
FastDFSClient client = new FastDFSClient("D:\\workspaces-itcast\\JaveEE18\\taotao-manager\\taotao-manager-web\\src\\main\\resources\\properties\\client.conf");
String uploadFile = client.uploadFile("D:\\Documents\\Pictures\\images\\200811281555127886.jpg", "jpg");
System.out.println(uploadFile);
}
上传成功
访问