Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have a file field which accepts multiple files. When I upload a regular file to the field and it passes the check, if I upload the second file which has a virus it won't scan it.
If I upload the first file which has a virus it will pick up the virus and delete the file.
Comment | File | Size | Author |
---|---|---|---|
#8 | clamav-multivalue-d6-1429018.patch | 1.04 KB | llillf |
#1 | clamav-multivalue-1429018.patch | 1.98 KB | Jing He |
Comments
Comment #1
Jing He CreditAttribution: Jing He commentedI created a patch against 7.x-1.0-alpha1 to add support for multi-value fields.
This patch uses hook_field_widget_WIDGET_TYPE_form_alter() to add upload_validators to file/image field widgets.
Please test it thoroughly in your environment.
Comment #2
Jing He CreditAttribution: Jing He commentedComment #3
manarth CreditAttribution: manarth commentedGreat spot, thanks Jing He!
Committed to 7.x-1.x. I've taken the part of your patch which handles the multiple
deltas
; I haven't changed the function-delegation to usehook_field_widget_WIDGET_TYPE_form_alter
just yet (although that's something I'll review for another release).Thanks again :-)
Comment #4
rooby CreditAttribution: rooby commentedSince this is committed to D7 this is now for D6.
Comment #5
llillf CreditAttribution: llillf commentedHi all, is there a patch for D6?
Comment #6
rooby CreditAttribution: rooby commentedNot yet. The patch that was committed to drupal 7 still has to be ported to drupal 6.
Comment #7
llillf CreditAttribution: llillf commentedHi rooby,
Any advice of patching D6?
Thanks a lot!!!
Comment #8
llillf CreditAttribution: llillf commentedHi all,
Attached is a patch I made for Drupal 6. It works for me! Hope it can help anyone and be committed to D6 after more testing.
Comment #9
adammaloneCan we please get rid of the whitespace added in the patch?
Comment #10
mcdruidThanks for the work that went into this, but closing D6 issues as outdated now.