title: Using curl to upload video to DailyMotion, all requests returning successful but video still not uploaded
body: <p>I have implemented the following Bash script with which I'm trying to upload videos to my Dailymotion account. All the <code>curl</code> requests return JSON responses as listed on the official API documentation pages. However, my video fails to show up in my account. What am I doing wrong here?</p>
  
  <pre><code>#!/bin/bash
  
  
      curl -s --output out.txt --data 'grant_type=password&amp;client_id=&lt;My-ID&gt;&amp;client_secret=&lt;My-Secret&gt;&amp;username=&lt;My-Username&gt;&amp;password=&lt;My-password&gt;&amp;scope=read+write' https://api.dailymotion.com/oauth/token
  
      var1=$(grep "access_token" out.txt | cut -d: --complement -f1)
      acc_token=$(echo $var1 | cut -d, -f1 | cut -d\" --complement -f1 | cut -d\" -f1)
  
      curl -s --output out.txt -i https://api.dailymotion.com/file/upload?access_token="$acc_token"        
      upload_url=$(grep "upload_url" out.txt | cut -d: --complement -f1 | cut -d\" --complement -f1 | cut -d\" -f1 | sed 's/\\//g')
  
      curl -s --output out.txt -F 'file=@/home/zahaib/video.mp4' "$upload_url"
      video_url=$(grep "url" out.txt | cut -d: --complement -f1-10 | cut -d\" --complement -f1 | cut -d# -f1 )
  
      curl -s --output out.txt -d $video_url https://api.dailymotion.com/me/videos?access_token="$acc_token"
      video_id=$(grep "id" out.txt | cut -d: --complement -f1 | cut -d\" --complement -f1 | cut -d\" -f1 )
  
      curl -s --output out.txt -d 'title=Vid&amp;channel=sport&amp;tags=was' https://api.dailymotion.com/video/"$video_id"/access_token="$acc_token"
      curl -s --output out.txt -d 'published=true' https://api.dailymotion.com/video/"$video_id"/access_token="$acc_token"
  </code></pre>