Plugin Directory

Changeset 475815


Ignore:
Timestamp:
12/15/2011 10:33:20 AM (14 years ago)
Author:
ostlund
Message:

Updating dropbox php class

File:
1 edited

Legend:

Unmodified
Added
Removed
  • dropbox-upload-form/trunk/inc/dropbox.php

    r395452 r475815  
    88 * The class is documented in the file itself. If you find any bugs help me out and report them. Reporting can be done by sending an email to php-dropbox-bugs[at]verkoyen[dot]eu.
    99 * If you report a bug, make sure you give me enough information (include your code).
     10 *
     11 * Changelog since 1.0.5
     12 * - Fixed filesPost so it can handle folders with spaces.
    1013 *
    1114 * Changelog since 1.0.4
     
    3740 *
    3841 * @author      Tijs Verkoyen <[email protected]>
    39  * @version     1.0.5
     42 * @version     1.0.6
    4043 *
    4144 * @copyright   Copyright (c), Tijs Verkoyen. All rights reserved.
     
    5659
    5760    // current version
    58     const VERSION = '1.0.5';
     61    const VERSION = '1.0.6';
    5962
    6063
     
    197200    {
    198201        // redefine
    199         $url = (string) $url;
     202        $url = str_replace('%20', ' ', (string) $url);
    200203        $parameters = (array) $parameters;
    201204
     
    430433
    431434                // set file
    432                 $content .= 'Content-Disposition: form-data; name=file; filename="' . $fileInfo['basename'] . '"' . "\r\n";
     435                $content .= 'Content-Disposition: form-data; name=file; filename="' . rawurldecode($fileInfo['basename']) . '"' . "\r\n";
    433436                $content .= 'Content-Type: application/octet-stream' . "\r\n";
    434437                $content .= "\r\n";
     
    947950        $url = '0/files/';
    948951        $url .= ($sandbox) ? 'sandbox/' : 'dropbox/';
    949         $url .= trim((string) $path, '/');
     952        $url .= str_replace(' ', '%20', trim((string) $path, '/'));
    950953
    951954        // make the call
Note: See TracChangeset for help on using the changeset viewer.