Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/derrickmehaffy/strapi-test-clamav
Strapi sample application showing how you could integrate clamav
https://github.com/derrickmehaffy/strapi-test-clamav
Last synced: 2 days ago
JSON representation
Strapi sample application showing how you could integrate clamav
- Host: GitHub
- URL: https://github.com/derrickmehaffy/strapi-test-clamav
- Owner: derrickmehaffy
- Created: 2021-06-30T19:18:55.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-06-30T19:26:24.000Z (over 3 years ago)
- Last Synced: 2024-10-16T07:21:18.721Z (22 days ago)
- Language: JavaScript
- Size: 609 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Strapi ClamAV Virus detection provider
This is a sample application built on a custom provider code built by a 3rd party (can't name them).
My modifications here are to the upload plugin itself to add support for a custom HTTP409 Response Code (Conflict) to the file upload provider. This effectively returns a "human readable" error to the admin panel. It does require forking the entire upload plugin which has been moved to the [packages](./packages) directory.
Below is an example of the message:
![virus_message](./images/virus_message.png)
This is done by adding the `virusError` function to the [upload plugin's error API](./packages/strapi-plugin-upload/errors.js)
Then calling that in the [clamav provider](./packages/strapi-provider-upload-clamav-proxy/lib/index.js)