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.
README
Section titled “README”Files browser package
What does it do
Section titled “What does it do”This package is used to upload, delete and reuse files.
Installing
Section titled “Installing”composer require ulams/filesphp artisan migratephp artisan db:seed --class="Ulams\Files\Database\Seeders\PermissionTableSeeder"
Database
Section titled “Database”This package adds access_to_directories column to the users table.
Endpoints
Section titled “Endpoints”All the endpoints are defined in
Run ./vendor/bin/phpunit to run tests.
Events
Section titled “Events”This package does not dispatch any events.
Listeners
Section titled “Listeners”This package listens for events and adds or removes user access to directories.
-
Ulams\Auth\Events\AccountConfirmed- add user access to directoryavatars/{user_id} -
Ulams\Courses\Events\CourseTutorAssigned- add user access to directorycourse/{course_id} -
Ulams\Courses\Events\CourseTutorUnassigned- remove user access to directorycourse/{course_id} -
Ulams\Webinar\Events\WebinarTrainerAssigned- add user access to directorywebinar/{webinar_id} -
Ulams\Webinar\Events\WebinarTrainerUnassigned- remove user access to directorywebinar/{webinar_id} -
Ulams\StationaryEvents\Events\StationaryEventAuthorAssigned- add user access to directorystationary-events/{stationary_evet_id} -
Ulams\StationaryEvents\Events\StationaryEventAuthorUnassigned- remove user access to directorystationary-events/{stationary_evet_id}
How to use this on frontend
Section titled “How to use this on frontend”Admin panel
Section titled “Admin panel”Left menu

Files browser

File finder

Upload the file to the selected directory

Permissions
Section titled “Permissions”Permissions are defined in seeder
More documentation in the package
Section titled “More documentation in the package”- api/packages/files/ADMIN.md
- api/packages/files/docs/finder.png
- api/packages/files/docs/list.png
- api/packages/files/docs/menu.png
- api/packages/files/docs/upload.png
API endpoints
Section titled “API endpoints”| 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 |
Permissions
Section titled “Permissions”| 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 |
Settings
Section titled “Settings”Registered with AdministrableConfig::registerConfig (editable in the admin panel under Configuration → Settings).
None.
Events
Section titled “Events”None.
Artisan commands
Section titled “Artisan commands”None.
Scheduled jobs
Section titled “Scheduled jobs”None.
Environment variables read
Section titled “Environment variables read”APP_URL, FILES_MAX_SIZE_MB, FILES_MIMES