-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tag on upload #41
Tag on upload #41
Conversation
Tag uploaded files with "Unscanned"
Tag uploaded files with scan result
On-upload: If scan fails, tag uploaded file as "Unscanned"
On-upload: If file is too big, tag uploaded file as "Won't scan" # Test cases ## Small files Clean -> Clean Pup -> Pup Malicious -> blocks upload ## Large files Any -> Won't scan ## VaaS error (e.g. wrong credentials) Any -> Unscanned
* Rename EventListener to CacheEntryListener * Add documentation to VerdictService
lib/EventListener.php
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still a rather generic name
lib/EventListener.php
Outdated
use OCP\Files\Cache\CacheEntryUpdatedEvent; | ||
use Psr\Log\LoggerInterface; | ||
|
||
class EventListener implements IEventListener |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class EventListener implements IEventListener | |
class CacheEventsListener implements IEventListener |
class EventListener implements IEventListener | |
class PostUploadEventListener implements IEventListener |
| Upgrade Nextcloud via CLI | `docker exec --user www-data {nextcloud_container} php occ upgrade` | | ||
| Watch logs | `docker exec --user www-data {nextcloud_container} php occ log:watch` | | ||
| Set log level to debug | `docker exec --user www-data {nextcloud_container} php occ log:manage --level DEBUG` | | ||
| Watch logs | `docker exec --user www-data nextcloud-container /bin/sh -c "tail -f data/nextcloud.log" \| jq .message` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are still multiple Watch logs
the log:tail
command seems pretty good
$ docker exec -it --user www-data nextcloud-container php occ log:tail --help
Description:
Tail the nextcloud logfile
Usage:
log:tail [options] [--] [<lines>]
Arguments:
lines The number of log entries to print [default: "10"]
Options:
-f, --follow Output new log entries as they appear
-r, --raw Output raw log json instead of formatted log item
--output[=OUTPUT] Output format (plain, json or json_pretty, default is plain) [default: "plain"]
-h, --help Display help for the given command. When no command is given display help for the list command
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output
-n, --no-interaction Do not ask any interactive question
--no-warnings Skip global warnings, show command output only
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
same for the 'logs:watch' command:
$ docker exec -it --user www-data nextcloud-container php occ log:watch --help
Description:
Watch the nextcloud logfile
Usage:
log:watch [options]
Options:
-r, --raw Output raw log json instead of formatted log item
--output[=OUTPUT] Output format (plain, json or json_pretty, default is plain) [default: "plain"]
-h, --help Display help for the given command. When no command is given display help for the list command
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output
-n, --no-interaction Do not ask any interactive question
--no-warnings Skip global warnings, show command output only
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
No description provided.