src/services/Resize.php
private function _createRemoteFile(VolumeInterface $volume, string $filename, string $path)
    {
        // Delete already existing file
        $volume->deleteFile($filename);

        // Create new file
        $stream = @fopen($path, 'rb');
        $volume->createFileByStream($filename, $stream, []);
    }
private function _createRemoteFile(VolumeInterface $volume, string $filename, string $path)
    {
        // Delete already existing file
        $volume->deleteFile($filename);

        // Create new file
        $stream = @fopen($path, 'rb');
        $volume->createFileByStream($filename, $stream, []);
    }
private function _createRemoteFile ( VolumeInterface $ volume , string $ filename , string $ path ) { // Delete already existing file $ volume -> deleteFile ( $ filename ) ; // Create new file $ stream = @ fopen ( $ path , 'rb' ) ; $ volume -> createFileByStream ( $ filename , $ stream , [ ] ) ; }
Store new created file on cloud server

@param VolumeInterface $volume
@param string          $filename
@param string          $path

@throws \craft\errors\VolumeException
@throws \craft\errors\VolumeObjectExistsException
Store new created file on cloud server