The functionality of a student directly submitting a file for an answer is not currently provided by pg or webwork2. It may be possible to hack with things and make this work.
A student can use the "Email Instructor" link, and attach a file to an email though.