If you are comfortable with PHP debugging, take a look at the following function:
The calling context is:
/**
* Save an uploaded file.
* @param $args array
* @param $request PKPRequest
* @return JSONMessage JSON object
*/
function saveFile($args, $request) {
$fileUploadForm = $this->_getFileUploadForm($request);
$fileUploadForm->readInputData();
if ($fileUploadForm->validate()) {
if ($fileUploadForm->execute($request)) {
// Generate a JSON message with an event
$settingName = $request->getUserVar('fileSettingName');
return DAO::getDataChangedEvent($settingName);
}
}
return new JSONMessage(false, __('common.invalidFileType'));
}
You are falling through to the final return in that call, probably because $fileUploadForm->execute($request)
is returning false
.
Nardusg
22
Hi @ctgraham
Just some feedback, turns out all I had to do was comment this line in die config
[finfo]
;mime_database_path = /etc/magic.mime
and it worked.
Regards
2 Likes
luizsi
24
My friend this solution was perfect, it served me correctly. I greatly appreciate it. Oh sorry google english hehehe