src/Uploadcare/Uploader.php
public function fromResource($fp)
    {
        $tmpfile = tempnam(sys_get_temp_dir(), 'ucr');
        $temp = fopen($tmpfile, 'w');
        while (!feof($fp)) {
            fwrite($temp, fread($fp, 8192));
        }
        fclose($temp);
        fclose($fp);

        return $this->fromPath($tmpfile);
    }
public function fromResource($fp)
    {
        $tmpfile = tempnam(sys_get_temp_dir(), 'ucr');
        $temp = fopen($tmpfile, 'w');
        while (!feof($fp)) {
            fwrite($temp, fread($fp, 8192));
        }
        fclose($temp);
        fclose($fp);

        return $this->fromPath($tmpfile);
    }
public function fromResource ( $ fp ) { $ tmpfile = tempnam ( sys_get_temp_dir ( ) , 'ucr' ) ; $ temp = fopen ( $ tmpfile , 'w' ) ; while ( ! feof ( $ fp ) ) { fwrite ( $ temp , fread ( $ fp , 8192 ) ) ; } fclose ( $ temp ) ; fclose ( $ fp ) ; return $ this -> fromPath ( $ tmpfile ) ; }
Upload file from file pointer

@param resource $fp
@return File
@throws \Exception
Upload file from file pointer