mirror of
https://github.com/filegator/filegator.git
synced 2025-08-18 09:31:17 +02:00
show filesize and remaining time on download (#181)
* show filesize on download
This commit is contained in:
@@ -134,6 +134,7 @@ class Filesystem implements Service
|
||||
return [
|
||||
'filename' => $this->getBaseName($path),
|
||||
'stream' => $this->storage->readStream($path),
|
||||
'filesize' => $this->storage->getSize($path),
|
||||
];
|
||||
}
|
||||
|
||||
|
@@ -62,10 +62,12 @@ class Tmpfs implements Service, TmpfsInterface
|
||||
$filename = $this->sanitizeFilename($filename);
|
||||
|
||||
$stream = fopen($this->getPath().$filename, 'r');
|
||||
$filesize = filesize($this->getPath().$filename);
|
||||
|
||||
return [
|
||||
'filename' => $filename,
|
||||
'stream' => $stream,
|
||||
'filesize' => $filesize,
|
||||
];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user