Skip to content

Instantly share code, notes, and snippets.

@frankdejonge
Created April 26, 2015 09:30
Show Gist options
  • Save frankdejonge/ca5978a37d39f1ba4f3e to your computer and use it in GitHub Desktop.
Save frankdejonge/ca5978a37d39f1ba4f3e to your computer and use it in GitHub Desktop.
Streamed upload
<?php
$source = $_FILES['name']['tmp_name'];
$handle = fopen($source, 'r+');
$filesystem->writeStream('destination/file.txt', $handle);
if (is_resource($handle)) {
fclose($handle);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment