Skip to content

Upload videos from third party applications

YouPHPTube edited this page Dec 4, 2018 · 15 revisions

This tutorial will clarify how third parties apps can Upload files to YouPHPTube

Where to Upload

We will use the Mobile Plugin Upload File to receive the file, you Will need to upload your video to the URL

yourSite+'plugin/MobileManager/upload.php?user='+ this.user.login + '&pass=' + this.user.md5password+

For example, to upload to the demo site on the Admin profile, your URL will be

https://demo.youphptube.com/plugin/MobileManager/upload.php?user=admin&pass=md5(123)

and the file post key should be 'upl', we expect in PHP to receive $_FILES['upl']

so, if you are using HTML you should have a form like this ...

<form enctype="multipart/form-data" method="post" action="http://127.0.0.1/YouPHPTube/plugin/MobileManager/upload.php?user=admin&pass=<?php echo encryptPassword('123'); ?>">
    <input name="title" type="text" /><br>
    <textarea name="description"></textarea><br>
    <input name="categories_id" type="hidden" value="1" />
    <input name="upl" type="file"  accept="video/mp4"  /><br>
    <input type="submit" value="submit" id="submit"/>
</form>

You can find the encryptPassword function here https://github.com/DanielnetoDotCom/YouPHPTube/blob/ec87a31ff71c22d22079d15ab0f64a95bb6860de/objects/functions.php#L1147

You also can send GET or POST variables to it with the following values: title, description and categories_id

Clone this wiki locally