PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / 2.15.3
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder v2.15.3
3.3.1 V-3.3.0 3.2.2 3.2.1 3.2.0 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 V3.0.3 V3.0.2 -3.0.1 V_3.0.0 1.1.1 1.1.8 1.2 1.3 1.4 1.4.18 1.5.2 1.9 2.0 2.10.0 2.10.1 All 138 releases
← All changes | includes/Core/Integration/ZohoProjects/FilesApiHelper.php +2 -3 3.1.02.15.3 View file →
@@ -6,9 +6,8 @@
6 6 */
7 7
8 8 namespace BitCode\BitForm\Core\Integration\ZohoProjects;
9 9
10 -use BitCode\BitForm\Core\Util\FileHandler;
11 10 use BitCode\BitForm\Core\Util\HttpHelper;
12 11
13 12 /**
14 13 * Provide functionality for Upload files
@@ -31,9 +30,9 @@
31 30 $this->_payloadBoundary = wp_generate_password(24);
32 31 $this->_defaultHeader['Authorization'] = "Zoho-oauthtoken {$tokenDetails->access_token}";
33 32 $this->_defaultHeader['content-type'] = 'multipart/form-data; boundary=' . $this->_payloadBoundary;
34 33 $this->_apiDomain = \urldecode($tokenDetails->api_domain);
35 - $this->_basepath = FileHandler::getEntriesFileUploadDir($formID, $entryID) . DIRECTORY_SEPARATOR;
34 + $this->_basepath = BITFORMS_UPLOAD_DIR . DIRECTORY_SEPARATOR . $formID . DIRECTORY_SEPARATOR . $entryID . DIRECTORY_SEPARATOR;
36 35 }
37 36
38 37 /**
39 38 * Helps to execute upload files api
@@ -46,9 +45,9 @@
46 45 * @return mixed $uploadedFiles ID's of uploaded file in Zoho Projects
47 46 */
48 47 public function uploadFiles($files, $portalId, $projectId, $event, $eventId, $dataCenter)
49 48 {
50 - $uploadFileEndpoint = "https://projectsapi.zoho.{$dataCenter}/restapi/portal/{$portalId}/projects/{$projectId}/" . ('task' === $event || 'subtask' === $event ? 'tasks' : 'bugs') . "/{$eventId}/attachments/";
49 + $uploadFileEndpoint = "https://projectsapi.zoho.{$dataCenter}/restapi/portal/{$portalId}/projects/{$projectId}/" . ('task' === $event || 'subtask' === $event ? 'tasks' : 'bugs') . "/${eventId}/attachments/";
51 50
52 51 $payload = '';
53 52 if (is_array($files)) {
54 53 foreach ($files as $fileIndex => $fileName) {