mirror of
https://github.com/filegator/filegator.git
synced 2025-08-11 01:33:58 +02:00
Fix: merging chunks after upload
This commit is contained in:
@@ -30,11 +30,17 @@ class Tmpfs implements Service, TmpfsInterface
|
||||
}
|
||||
}
|
||||
|
||||
public function write(string $filename, $data)
|
||||
public function write(string $filename, $data, $append = false)
|
||||
{
|
||||
$filename = $this->sanitizeFilename($filename);
|
||||
|
||||
file_put_contents($this->getPath().$filename, $data);
|
||||
$flags = 0;
|
||||
|
||||
if ($append) {
|
||||
$flags = FILE_APPEND;
|
||||
}
|
||||
|
||||
file_put_contents($this->getPath().$filename, $data, $flags);
|
||||
}
|
||||
|
||||
public function getFileLocation(string $filename): string
|
||||
|
@@ -16,7 +16,7 @@ interface TmpfsInterface
|
||||
|
||||
public function findAll($pattern): array;
|
||||
|
||||
public function write(string $filename, $data);
|
||||
public function write(string $filename, $data, $append);
|
||||
|
||||
public function read(string $filename): string;
|
||||
|
||||
|
Reference in New Issue
Block a user