public function register()
    {
        // Register the commands
        $this->commands([
            ClearChunksCommand::class,
        ]);

        // Register the config
        $this->registerConfig();

        // Register the config via abstract instance
        $this->app->singleton(AbstractConfig::class, function () {
            return new FileConfig();
        });

        // Register the config via abstract instance
        $this->app->singleton(ChunkStorage::class, function ($app) {
            /** @var AbstractConfig $config */
            $config = $app->make(AbstractConfig::class);

            // Build the chunk storage
            return new ChunkStorage($this->disk($config->chunksDiskName()), $config);
        });

        /*
         * Bind a FileReceiver for dependency and use only the first object
         */
        $this->app->bind(FileReceiver::class, function ($app) {
            /** @var Request $request */
            $request = $app->make('request');

            // Get the first file object - must be converted instances of UploadedFile
            $file = array_first($request->allFiles());

            // Build the file receiver
            return new FileReceiver($file, $request, HandlerFactory::classFromRequest($request));
        });
    }