> For the complete documentation index, see [llms.txt](https://mostafaznv.gitbook.io/larupload/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mostafaznv.gitbook.io/larupload/standalone-uploader/cover/update-cover.md).

# Update Cover

To update the cover file for an attachment in standalone mode, you can use the `changeCover` method.

This method takes an argument which is the new cover file.

```php
<?php

namespace App\Http\Controllers;

use Mostafaznv\Larupload\Larupload;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;

class UploadController extends Controller
{
    public function store(Request $request): RedirectResponse
    {
        $cover = $request->file('cover');
        
        Larupload::init('uploaded/base/path')->changeCover($cover);

        return redirect()->back();
    }
}
```
