Hi,
I've been reviewing the code of this plugin, found there's a problem when uploading with Firefox (Chrome seems to work all right). Also, when downloading found issues when the original file name contains underscores or/and spaces, two plugin files should be modified to address these problems:
1.- digital_goods/index.php
Replace:
$fileMime = $files['type'][$key] ;
With:
$finfo = finfo_open(FILEINFO_MIME_TYPE);
$fileMime = finfo_file($finfo, $files['tmp_name'][$key]);
// $fileMime = $files['type'][$key] ;
2.- digital_goods/download.php (2 modifications)
2a:
Replace:
$download = DGModel::newInstance()->getFileByItemNameCode(@$tmp[1], @$tmp[2], $tmp[0]);
With:
$name = preg_replace('/^' . $tmp[0] . '_' . $tmp[1] . '_(.*)$/', '$1', $filename);
$download = DGModel::newInstance()->getFileByItemNameCode(@$tmp[1], @$name, $tmp[0]);
2b:
Replace:
header('Content-Disposition: attachment; filename='.basename($file));
With:
header('Content-disposition: attachment; filename="'.basename($file).'"');
Regards