Changeset 475815
- Timestamp:
- 12/15/2011 10:33:20 AM (14 years ago)
- File:
-
- 1 edited
-
dropbox-upload-form/trunk/inc/dropbox.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dropbox-upload-form/trunk/inc/dropbox.php
r395452 r475815 8 8 * 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. 9 9 * 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. 10 13 * 11 14 * Changelog since 1.0.4 … … 37 40 * 38 41 * @author Tijs Verkoyen <[email protected]> 39 * @version 1.0. 542 * @version 1.0.6 40 43 * 41 44 * @copyright Copyright (c), Tijs Verkoyen. All rights reserved. … … 56 59 57 60 // current version 58 const VERSION = '1.0. 5';61 const VERSION = '1.0.6'; 59 62 60 63 … … 197 200 { 198 201 // redefine 199 $url = (string) $url;202 $url = str_replace('%20', ' ', (string) $url); 200 203 $parameters = (array) $parameters; 201 204 … … 430 433 431 434 // 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"; 433 436 $content .= 'Content-Type: application/octet-stream' . "\r\n"; 434 437 $content .= "\r\n"; … … 947 950 $url = '0/files/'; 948 951 $url .= ($sandbox) ? 'sandbox/' : 'dropbox/'; 949 $url .= trim((string) $path, '/');952 $url .= str_replace(' ', '%20', trim((string) $path, '/')); 950 953 951 954 // make the call
Note: See TracChangeset
for help on using the changeset viewer.