diff options
author | Phie <phie@phie.ovh> | 2018-09-02 00:47:53 +0300 |
---|---|---|
committer | Phie <phie@phie.ovh> | 2018-09-02 00:47:53 +0300 |
commit | 2cb9f1dfcb2a61cd16616c703c1621dbadcf3647 (patch) | |
tree | eb3b50673bceea552f63d9cdc81d5b76e1d309bb /lib | |
parent | e309e17a6a44d070a53ad487ba4bb220753bea17 (diff) |
wordaround to fix bad size on nextcloud
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/Controller/NoteController.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Controller/NoteController.php b/lib/Controller/NoteController.php index a3931c4..3676367 100755 --- a/lib/Controller/NoteController.php +++ b/lib/Controller/NoteController.php @@ -375,7 +375,13 @@ } catch(\OCP\Files\NotFoundException $e) { } $file = $this->CarnetFolder->newFile($path); - $zipFile->saveAsStream($file->fopen("w")); + //tried to do with a direct fopen on $file but lead to bad size on nextcloud + $tmppath = getcwd()."/".uniqid().".sqd"; + $zipFile->saveAsFile($tmppath); + $tmph = fopen($tmppath, "r"); + $file->putContent($tmph); + fclose($tmph); + unlink($tmppath); } private function addFolderContentToArchive($folder, $archive, $relativePath){ |