Skip to content
Advertisement

Dailymotion API – Can’t get to a video to upload

I can’t manage to get a file to upload the DailyMotion API.

I’m following these steps : https://developer.dailymotion.com/video-upload/upload-new-video-api/

The first API call runs fine and returns me the “upload_url” that I feed into the method you’ll see below.

It fails on the 2nd step and the response error is :

JavaScript

How am I supposed to set the content size ?

the code for the 2nd call :

JavaScript

OS : W10 I made sure the file path and the upload URL are correct.

I tried using the dailymotion/sdk lib and use the function that uploads a file instead of using my curl requests, but I get the exact same error.

Advertisement

Answer

Problem Solved, It was issue with curl/PHP. I was running the script in PHP 7.4.3-dev, updated to 7.4.11 and it solved the issue. More Info about the bug here : https://bugs.php.net/bug.php?id=79013

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement