| @@ 771-779 (lines=9) @@ | ||
| 768 | } |
|
| 769 | // Create a new temporary memory file... |
|
| 770 | $handle = fopen( 'php://temp', 'wb' ); |
|
| 771 | if ( $handle ) { |
|
| 772 | $reqs[$path] = [ |
|
| 773 | 'method' => 'GET', |
|
| 774 | 'url' => $this->storageUrl( $auth, $srcCont, $srcRel ), |
|
| 775 | 'headers' => $this->authTokenHeaders( $auth ) |
|
| 776 | + $this->headersFromParams( $params ), |
|
| 777 | 'stream' => $handle, |
|
| 778 | ]; |
|
| 779 | } |
|
| 780 | $contents[$path] = false; |
|
| 781 | } |
|
| 782 | ||
| @@ 1103-1113 (lines=11) @@ | ||
| 1100 | $tmpFile = TempFSFile::factory( 'localcopy_', $ext ); |
|
| 1101 | if ( $tmpFile ) { |
|
| 1102 | $handle = fopen( $tmpFile->getPath(), 'wb' ); |
|
| 1103 | if ( $handle ) { |
|
| 1104 | $reqs[$path] = [ |
|
| 1105 | 'method' => 'GET', |
|
| 1106 | 'url' => $this->storageUrl( $auth, $srcCont, $srcRel ), |
|
| 1107 | 'headers' => $this->authTokenHeaders( $auth ) |
|
| 1108 | + $this->headersFromParams( $params ), |
|
| 1109 | 'stream' => $handle, |
|
| 1110 | ]; |
|
| 1111 | } else { |
|
| 1112 | $tmpFile = null; |
|
| 1113 | } |
|
| 1114 | } |
|
| 1115 | $tmpFiles[$path] = $tmpFile; |
|
| 1116 | } |
|