Changeset 2411449
- Timestamp:
- 11/02/2020 09:37:01 PM (5 years ago)
- File:
-
- 1 edited
-
quant/trunk/quant.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
quant/trunk/quant.php
r2391375 r2411449 85 85 $url = parse_url($info['url']); 86 86 $settings = get_option(QUANT_SETTINGS_KEY); 87 $api_endpoint = $settings['api_endpoint'] . '/v1'; 87 88 88 89 // We're only concerned about intercepting Quant calls. 89 if (strpos($info['url'], $ settings['api_endpoint']) === -1) {90 if (strpos($info['url'], $api_endpoint) === -1) { 90 91 return; 91 92 } … … 94 95 // to catch in this hook so that we can create the file 95 96 // stream with cURL. 96 if ($url['path'] != '/ file-upload') {97 if ($url['path'] != '/v1/file-upload') { 97 98 return; 98 99 } … … 105 106 106 107 // Build the CURL options to stream the files. 107 curl_setopt($handle, CURLOPT_URL, $ settings['api_endpoint']);108 curl_setopt($handle, CURLOPT_URL, $api_endpoint); 108 109 109 110 $data['data'] = curl_file_create(
Note: See TracChangeset
for help on using the changeset viewer.