Plugin Directory

Changeset 2411449


Ignore:
Timestamp:
11/02/2020 09:37:01 PM (5 years ago)
Author:
stooit
Message:

Fix v1 prefix on files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • quant/trunk/quant.php

    r2391375 r2411449  
    8585    $url = parse_url($info['url']);
    8686    $settings = get_option(QUANT_SETTINGS_KEY);
     87    $api_endpoint = $settings['api_endpoint'] . '/v1';
    8788
    8889    // 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) {
    9091        return;
    9192    }
     
    9495    // to catch in this hook so that we can create the file
    9596    // stream with cURL.
    96     if ($url['path'] != '/file-upload') {
     97    if ($url['path'] != '/v1/file-upload') {
    9798        return;
    9899    }
     
    105106
    106107    // 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);
    108109
    109110    $data['data'] = curl_file_create(
Note: See TracChangeset for help on using the changeset viewer.