音视频样例配置审核流程(配置下发,配置取消)完善
This commit is contained in:
@@ -9,6 +9,8 @@ import javax.ws.rs.client.WebTarget;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import javax.ws.rs.core.Response;
|
||||
|
||||
import net.sf.json.JSONObject;
|
||||
|
||||
import org.glassfish.jersey.media.multipart.FormDataMultiPart;
|
||||
import org.glassfish.jersey.media.multipart.file.FileDataBodyPart;
|
||||
|
||||
@@ -95,7 +97,7 @@ public class ConfigServiceUtil {
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static String postFileCfg(String params,File file,Map<String, Object> fileDesc) throws Exception{
|
||||
public static String postFileCfg(String params,File file,JSONObject fileDesc) throws Exception{
|
||||
String result = null;
|
||||
String url = Constants.SERVICE_URL+Constants.FILE_UPLOAD_CFG;
|
||||
//创建连接
|
||||
@@ -103,7 +105,7 @@ public class ConfigServiceUtil {
|
||||
FormDataMultiPart formDataMultiPart=new FormDataMultiPart();
|
||||
FileDataBodyPart bodyPart=new FileDataBodyPart("file",file);
|
||||
formDataMultiPart.bodyPart(bodyPart);
|
||||
Builder header = wt.request(MediaType.APPLICATION_JSON).header("File-Desc",ClientUtil.formatFileDesc(fileDesc) );
|
||||
Builder header = wt.request(MediaType.APPLICATION_JSON).header("File-Desc",fileDesc);
|
||||
Response response= header.post(Entity.entity(formDataMultiPart, formDataMultiPart.getMediaType()));
|
||||
if( response.getStatus() == 200){
|
||||
result= response.readEntity(String.class);
|
||||
|
||||
Reference in New Issue
Block a user