src/Engine/Helpers/CrudeSpecialFiles.php
public function upload($file, $key)
    {
        if (! $file || ! $this->isValidKey($key))
            return;

        $fileName = $file->getClientOriginalName();
        $pathinfo = pathinfo($fileName);

        $this->deleteStored($key);

        Storage::putFileAs($this->getStoragePath(), $file, $key . '.' . $pathinfo['extension']);
    }
public function upload($file, $key)
    {
        if (! $file || ! $this->isValidKey($key))
            return;

        $fileName = $file->getClientOriginalName();
        $pathinfo = pathinfo($fileName);

        $this->deleteStored($key);

        Storage::putFileAs($this->getStoragePath(), $file, $key . '.' . $pathinfo['extension']);
    }
public function upload ( $ file , $ key ) { if ( ! $ file || ! $ this -> isValidKey ( $ key ) ) return ; $ fileName = $ file -> getClientOriginalName ( ) ; $ pathinfo = pathinfo ( $ fileName ) ; $ this -> deleteStored ( $ key ) ; Storage :: putFileAs ( $ this -> getStoragePath ( ) , $ file , $ key . '.' . $ pathinfo [ 'extension' ] ) ; }
Upload file if exist and key is correct

@param  File $file
@param  string $key
Upload file if exist and key is correct