File tree Expand file tree Collapse file tree 2 files changed +7
-9
lines changed
wcfsetup/install/files/lib Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change 66use wcf \data \file \temporary \FileTemporary ;
77use wcf \data \file \thumbnail \FileThumbnailEditor ;
88use wcf \data \file \thumbnail \FileThumbnailList ;
9- use wcf \event \file \FileCreated ;
9+ use wcf \event \file \UploadCompleted ;
1010use wcf \system \event \EventHandler ;
1111use wcf \system \file \processor \FileProcessor ;
1212use wcf \system \image \ImageHandler ;
@@ -120,7 +120,7 @@ public static function createFromTemporary(FileTemporary $fileTemporary): File
120120 $ filePath . $ file ->getSourceFilename ()
121121 );
122122
123- $ event = new FileCreated ($ file );
123+ $ event = new UploadCompleted ($ file );
124124 EventHandler::getInstance ()->fire ($ event );
125125
126126 return $ event ->getFile ();
@@ -191,10 +191,7 @@ public static function createFromExistingFile(
191191 $ filePath . $ file ->getSourceFilename ()
192192 );
193193
194- $ event = new FileCreated ($ file );
195- EventHandler::getInstance ()->fire ($ event );
196-
197- return $ event ->getFile ();
194+ return $ file ;
198195 }
199196
200197 /**
Original file line number Diff line number Diff line change 66use wcf \event \IPsr14Event ;
77
88/**
9- * Fired when a file was created before it is returned to the callee.
9+ * Fired when a file was uploaded before it is returned to the callee.
1010 *
1111 * @author Alexander Ebert
1212 * @copyright 2001-2025 WoltLab GmbH
1313 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
1414 * @since 6.1
1515 */
16- final class FileCreated implements IPsr14Event
16+ final class UploadCompleted implements IPsr14Event
1717{
1818 public function __construct (
1919 private File $ file ,
@@ -25,7 +25,8 @@ public function getFile(): File
2525 }
2626
2727 /**
28- * Reloads the file to fetch updated values.
28+ * Reloads the file to fetch updated values. This must be called whenever
29+ * the uploaded files has been modified by a listener.
2930 */
3031 public function reload (): void
3132 {
You can’t perform that action at this time.
0 commit comments