Skip to content

Commit 127bc6d

Browse files
committed
Add back the "real" upload check.
This was removed when the uploads were reworked, but I see now that it should not have been. Without this a warning about the empty string not being a valid upload occurs if there is not an upload.
1 parent c818053 commit 127bc6d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/WeBWorK.pm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ async sub dispatch ($c) {
108108
my @uploads = @{ $c->req->uploads };
109109

110110
for my $u (@uploads) {
111+
# Make sure it's a "real" upload.
112+
next unless $u->filename;
113+
111114
# Store the upload.
112115
my $upload = WeBWorK::Upload->store($u, $ce->{webworkDirs}{uploadCache});
113116

0 commit comments

Comments
 (0)