Skip to content

Package: files

Generated from api/packages/files

Source: api/packages/files · imported version 0.1.29. The sections after the README are extracted from the code on every docs build.

Files browser package

swagger codecov phpunit Maintainability

This package is used to upload, delete and reuse files.

  • composer require ulams/files
  • php artisan migrate
  • php artisan db:seed --class="Ulams\Files\Database\Seeders\PermissionTableSeeder"

This package adds access_to_directories column to the users table.

All the endpoints are defined in swagger

Run ./vendor/bin/phpunit to run tests. phpunit codecov

This package does not dispatch any events.

This package listens for events and adds or removes user access to directories.

  • Ulams\Auth\Events\AccountConfirmed - add user access to directory avatars/{user_id}

  • Ulams\Courses\Events\CourseTutorAssigned - add user access to directory course/{course_id}

  • Ulams\Courses\Events\CourseTutorUnassigned - remove user access to directory course/{course_id}

  • Ulams\Webinar\Events\WebinarTrainerAssigned - add user access to directory webinar/{webinar_id}

  • Ulams\Webinar\Events\WebinarTrainerUnassigned - remove user access to directory webinar/{webinar_id}

  • Ulams\StationaryEvents\Events\StationaryEventAuthorAssigned - add user access to directory stationary-events/{stationary_evet_id}

  • Ulams\StationaryEvents\Events\StationaryEventAuthorUnassigned - remove user access to directory stationary-events/{stationary_evet_id}

Left menu Menu

Files browser List

File finder Finder

Upload the file to the selected directory Upload

Permissions are defined in seeder

Method Path Auth Action
GET /api/admin/file/list yes FileApiController@list
GET /api/admin/file/find yes FileApiController@findByName
POST /api/admin/file/upload yes FileApiController@upload
POST /api/admin/file/move yes FileApiController@move
DELETE /api/admin/file/delete yes FileApiController@delete
Permission Seeded for roles Constant
file_list admin, tutor FilePermissionsEnum::FILE_LIST
file_list_self admin, tutor FilePermissionsEnum::FILE_LIST_SELF
file_create admin, tutor FilePermissionsEnum::FILE_CREATE
file_delete admin, tutor FilePermissionsEnum::FILE_DELETE
file_update admin, tutor FilePermissionsEnum::FILE_UPDATE

Registered with AdministrableConfig::registerConfig (editable in the admin panel under Configuration → Settings).

None.

None.

None.

None.

APP_URL, FILES_MAX_SIZE_MB, FILES_MIMES