diff --git a/src/PdoAdapter.php b/src/PdoAdapter.php
index <HASH>..<HASH> 100644
--- a/src/PdoAdapter.php
+++ b/src/PdoAdapter.php
@@ -370,9 +370,7 @@ class PdoAdapter implements AdapterInterface
      */
     protected function getChunkResource($pathId, $isCompressed)
     {
-        $filename = $this->getTempFilename();
-        $resource = $this->getTempResource($filename, '');
-
+        $resource = fopen('php://temp', 'w+b');
         $compressFilter = null;
         if ($isCompressed) {
             $compressFilter = stream_filter_append($resource, 'zlib.inflate', STREAM_FILTER_WRITE);
Fix #3 Use php://temp for file resources

When getChunkResource is called for file reads, it now uses the
php://temp resource which automatically cleans up. This should mean
less temporary files left behind.