private function saveToDatabase(Collection $collection)
    {
        $model = new ImageuploadModel();
        $fillable = $model->getFillable();
        $input = $collection->only($fillable)->toArray();

        $dimensions = $collection['dimensions'];

        foreach ($dimensions as $key => $dimension) {
            foreach ($dimension as $k => $v) {
                $input[$key.'_'.$k] = $v;
            }
        }

        return $model->firstOrCreate($input);
    }