$apiClient = new APIClient($signer); //Create Doc Api object $docApi = new DocApi($apiClient); //Create Storage Api object $apiStorage = new StorageApi($apiClient); //Create AsyncApi object $api = new AsyncApi($apiClient); $mergApi = new MergeApi($apiClient); $signatureApi = new SignatureApi($apiClient); //Set url to choose whot server to use if ($basePath == "") { //If base base is empty seting base path to prod server $basePath = 'https://api.groupdocs.com/v2.0'; } //Set base path $docApi->setBasePath($basePath); $apiStorage->setBasePath($basePath); $api->setBasePath($basePath); $mergApi->setBasePath($basePath); $signatureApi->setBasePath($basePath); //Get entered by user data $name = F3::get('POST["name"]'); $lastName = "lastName"; $email = F3::get('POST["email"]'); $country = F3::get('POST["country"]'); $city = F3::get('POST["city"]'); $street = F3::get('POST["street"]'); F3::set("email", $email); F3::set("country", $country); F3::set("name", $name); F3::set("lastName", $lastName);
//###Create Signer, ApiClient and Storage Api objects //Create signer object $signer = new GroupDocsRequestSigner($privateKey); //Create apiClient object $apiClient = new APIClient($signer); //Create Doc Api object $api = new DocApi($apiClient); //Create Storage Api object $storageApi = new StorageApi($apiClient); //Set url to choose whot server to use if ($basePath == "") { //If base base is empty seting base path to prod server $basePath = 'https://api.groupdocs.com/v2.0'; } //Set base path $api->setBasePath($basePath); $storageApi->setBasePath($basePath); //Get entered by user data $url = F3::get('POST["url"]'); $file = $_FILES['file']; $fileId = F3::get('POST["fileId"]'); $fileGuId = ""; //Check is file GUID entered if ($fileId != "") { $fileGuId = $fileId; } //If user choose upload file from URL if ($url != "") { //Upload file from URL $uploadResult = $storageApi->UploadWeb($clientId, $url); //Check is file uploaded