use of com.eros.framework.http.okhttp.builder.PostFormBuilder in project WeexErosFramework by bmfe.
the class AxiosManager method upload.
private void upload(String url, String filePath, Map<String, String> uploadParams, Map<String, String> heads, StringCallback callback) {
PostFormBuilder builder = OkHttpUtils.post().url(url).params(uploadParams).headers(heads);
String ext = AppUtils.getFileExtName(filePath);
builder.addFile("file", TextUtils.isEmpty(ext) ? "file.jpg" : "file." + ext, new File(filePath));
builder.build().execute(callback);
}
Aggregations