Skip to content

Commit bb37b99

Browse files
committed
Update coreUpload
1 parent 14bab91 commit bb37b99

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/UploadManager.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ private function coreUpload($upload, $uploadedFilePath, $file, $preCallback)
8888
$newName = $this->strategy->makeFileName($file);
8989
$path = $this->strategy->makeStorePath($newName);
9090

91+
$upload->path = $path;
92+
9193
if (is_callable($preCallback)) {
9294
$upload = $preCallback($upload);
9395
}
@@ -100,11 +102,10 @@ private function coreUpload($upload, $uploadedFilePath, $file, $preCallback)
100102

101103
UploadValidator::validate($content, $this->validatorGroups);
102104

103-
$upload->path = $path;
104105
$upload->size = strlen($content);
105106

106107
$disk = \Storage::disk($upload->disk);
107-
if ($disk->put($path, $content) == false) {
108+
if ($disk->put($upload->path, $content) == false) {
108109
return false;
109110
}
110111

0 commit comments

Comments
 (0)