Login

Snippets by uandt

Snippet List

Scan uploaded file for viruses with clamav

A clean_<fieldname>() method in a form subclass as described [here](http://www.djangoproject.com/documentation/newforms/#custom-form-and-field-validation). Scans the field named *file* for viruses. My version of python-clamav does not support scanning of buffers. That is why I go through the hassle of saving the file to a temporary one.

  • newforms
  • clamav
  • virus
  • virus-scan
Read More

uandt has posted 1 snippet.