2

How to get progress file uploading with dailymotion api? It is possible to get percentage the progress file uploading?

I'm using ajax jquery.

   $.ajax({
          type: "POST",
          url: 'http://localhost:81/video_api/api_bridge/requestUrl', 
          /*this section to accessed uploadFile()*/        
          data:{
            'path':'/home/rizky/Downloads/114.mkv',
               },  
          success: function(result) {

            setInterval(function(){
               $.get(result.progress,
                  function(data) {
                    console.log(data);  
              /*this section, to updating <progress/> element.*/
                   }
               ); 
            },1200)


      console.log(result); 
     /*this section to accessed post('/me/videos')*/
    $.ajax({
          type: "POST",
          url: 'http://localhost:81/video_api/api_bridge/post_to_dailymotion', 
          data:{
              'path':'/home/rizky/Downloads/114.mkv',
              'title':'privasi',
              'publish_status':true,
              'playlist':'',
              'private_mode':true,
              'description':'',
              'upload_url':result.url, 
              'tags':'',
               }, 
              success: function(result) {
              console.log(result)
          $('.loadeng').css('display','none')
       },  
       error: function(aaa){
            console.log(aaa)
            console.log(aaa.responseText)
     }
    }); 
   },
   error: function(aaa){
     console.log(aaa)
     console.log(aaa.responseText)
   }
  });

And then, I want to show percentage value progress on the <progress> element. But the API of progress_url just gave me return message state done or starting instead percentage value progress.

Thanks, Regards.

deer dance
  • 39
  • 1
  • 6

1 Answers1

0

I think you will be able to find something interesting on the documentation, especially the publishing progress field and the encoding progress field.

Cheers, Giovanni

  • so, the documentation you gave me, I thought that will be works after the video successfully uploaded, because we need the video_id as parameters. – deer dance Oct 21 '16 at 03:31
  • But, I need to know how much percentage uploaded progress. If I uploaded big size video, it's make user wait with no sign how much they need to waited video uploaded until done and success. Before, I tried this one, but I don't get it. http://stackoverflow.com/questions/31978053/how-to-get-the-progress-url-working-when-uploading Thanks again @Giovanni – deer dance Oct 21 '16 at 03:40