Skip to content

Commit

Permalink
Create the file in the FS before the move
Browse files Browse the repository at this point in the history
  • Loading branch information
williamdes committed Dec 3, 2023
1 parent adb3f1e commit c7fb9e8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Resumable.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,10 @@ public function handleChunk()
$chunkDir = $this->tmpChunkDir($identifier) . DIRECTORY_SEPARATOR;
$chunkFile = $chunkDir . $this->tmpChunkFilename($filename, $chunkNumber);
$this->log('Moving chunk ' . $chunkNumber . ' for ' . $identifier);
$this->fileSystem->write($chunkFile, '');// Create the file and the folder
//TODO: implement the stream to send the data into another file system
// Only works with the local FS
// See: https://knplabs.github.io/Gaufrette/streaming.html
$firstFile->moveTo($chunkFile);
} else {
$this->log('The file does not implement UploadedFileInterface');
Expand Down

0 comments on commit c7fb9e8

Please sign in to comment.