Sending images and videos to server in android

前端 未结 3 703
走了就别回头了
走了就别回头了 2021-01-01 05:22

I am creating an android application for taking photos and videos. After capture images I want to send this image with date and some text to web server. In server side I am

3条回答
  •  暖寄归人
    2021-01-01 06:05

    try this to uplaod text ,image to server in asynctask

               FileBody filebodyVideo = new FileBody(new File(
                        "Sd Card VideoPath"));
    
                FileBody filebodyVideo1 = new FileBody(new File("Video Upload url"));
    
                StringBody Title= new StringBody("Put Title Here");
    
                StringBody description= new StringBody("Put Desc Here");
    
    
    
    
                MultipartEntity reqEntity = new MultipartEntity();
    
                reqEntity.addPart("image", filebodyVideo);
    
                multipartContent.addPart("Title", Title);
    
                multipartContent.addPart("Description", description);
    
    
                httppost.setEntity(multipartContent);
    

提交回复
热议问题