Adding a file to the medialibrary is easy. Just pick one of the starting methods, optionally add some of the middle methods
and finish with a finishing method. All start and middle methods are chainable.
/**
* Add a file to the medialibrary. The file will be removed from
* its original location.
*
* @paramstring|\Symfony\Component\HttpFoundation\File\UploadedFile$file
*
* @return\Spatie\MediaLibrary\FileAdder\FileAdder
*/publicfunctionaddMedia($file)
/**
* Copy a file to the medialibrary.
*
* @paramstring|\Symfony\Component\HttpFoundation\File\UploadedFile$file
*
* @return\Spatie\MediaLibrary\FileAdder\FileAdder
*/publicfunctioncopyMedia($file)