Skip to content

Commit a69df6f

Browse files
committed
creocoder still using Flysystem v1
1 parent 18d2e0e commit a69df6f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/uploader/FileUploader.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ public function upload($prefix, FileModelInterface $fileModel)
104104
$stream = fopen($uploaded->tempName, 'r+');
105105
$filename = "{$prefix}_{$uploaded->name}";
106106
$fullpath = "{$this->targetDir}/{$filename}";
107-
$result = $this->fileSystem->writeStream($fullpath, $stream); //write or update
107+
$result = $this->fileSystem->putStream($fullpath, $stream); //write or update
108108
fclose($stream);
109109

110-
if ($retval = $this->fileSystem->fileExists($fullpath)) {
110+
if ($retval = $this->fileSystem->has($fullpath)) {
111111
$retval = $fileModel->saveFile($uploaded, $filename, $this->targetDir, $this->type);
112112
} else {
113113
throw new ServerErrorHttpException("Gagal menyimpan file", 500);

0 commit comments

Comments
 (0)