I finally resolved it. Apologies for posting the solution lat. Below, is the function I created to upload the files to the server:
require('functions/egnyte/lib/curl.php');
require('functions/egnyte/lib/curl_response.php');
require('functions/egnyte/EgnyteClient.php');
function doUpload() {
$domain = 'yourdomain';
$folder = '/Shared/our folder name/';
$oauthToken = 'your oauth token';
$fileBinaryContents = file_get_contents($_FILES['filedata']['tmp_name']);
$fileName = $_FILES['filedata']['name'];
// instantiate an Egnyte Client with the domain and oAuth token for the user with which the upload will be performed
$egnyte = new EgnyteClient($domain, $oauthToken);
// perform the upload and get the response from the server
$response = $egnyte->uploadFile($folder, $fileName, $fileBinaryContents);
}
Please do let me know n case of any issues/problems if anyone faces. I can help out.
FYI:
You can also contact for:
- how to get the oauth token.
- list the folders for your egnyte account onto your website's page.