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.
The file_check_upload function is a bit misleading, in that not only does it 'check' an upload to ensure a file is valid, it also transfers the contents of the $_FILES array into an object which upload.module then processes. When reading the code it's not immediately obvious that this is what's happening, thus it can be quite confusing trying to figure out at what point this happens.
Here is a patch that attempts to clarify these comments to help explain this better.
Comment | File | Size | Author |
---|---|---|---|
file_check_upload_comments.patch | 1.36 KB | webchick | |
Comments
Comment #1
chx CreditAttribution: chx commentedI suggested this change (when Junyor asked something). I do remember my confusion when I was trying to understand the upload process. No code change so why not commit it :) ?
Comment #2
Dries CreditAttribution: Dries commentedComment #3
(not verified) CreditAttribution: commented