[wp-trac] [WordPress Trac] #32549: wp_remote_get does not stream to temp file
WordPress Trac
noreply at wordpress.org
Mon Jun 1 14:13:15 UTC 2015
#32549: wp_remote_get does not stream to temp file
--------------------------+-----------------------------
Reporter: andddd | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: HTTP API | Version: 4.2.2
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
Source:
{{{
$filename = wp_unique_filename( get_temp_dir(), basename( $zip_url ) );
var_dump(get_temp_dir());
var_dump($zip_url);
var_dump($filename);
$response = wp_remote_get( $zip_url, array(
'timeout' => 15,
'stream' => true,
'filename' => $filename
) );
}}}
Output:
{{{
string(49) "/var/folders/4p/s0vgsy5s19g63q9t0zd56hkw0000gn/T/"
string(77) "https://bucket.s3-eu-west-1.amazonaws.com/folder/file.zip"
string(8) "file.zip"
}}}
Seems like `wp_unique_filename` cannot combine filename with temp path. No
error returned after download. `wp_remote_get` crafts download path the
same way so it's broken too if I omit filename option.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32549>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list