I have a form set up with a file upload section among some other things. Unlike a lot of other people, I’m not having trouble changing the file upload from “single” to “multiple”. The file upload works fine, it allows multiple files and even lets you submit the form.
My problem is, once it’s uploaded, there’s no record of the files. You export the entry and, under “File”, the csv is just blank. I went back and checked it with a single-upload file section instead of a multi and it exports fine. There’s no major cap on our upload size, we’re well within our limits. I don’t know what it could be.
Just to update: I still haven’t fixed this issue, but I’m toying with the following fix:
add_filter(‘gform_export_field_value’, ‘export_multifile_field’, 10, 3);
function export_multifile_field($value, $form_id, $field_id) {
// Form ID is 99 and File Upload field ID is 3
if ($form_id == 99 && $field_id == 3) {
error_log('Applying filter for form ’ . $form_id . ‘, field ’ . $field_id);
$files = unserialize($value);
if (is_array($files)) {
return implode(’, ', $files);
}
}
return $value;
TBH it’s not going well so if anyone has any good ideas, I’d love to hear them!