Some problems were encounteredThe file you attempted to upload (NameOfFile.pdf) was of type "application/download", but the file extension "pdf" did not match the accepted extensions for this type of file: rar, RAR
Notice: Trying to get property of non-object in /.../vanillaroot/extensions/attachments/default.php on line 703Notice: Undefined property: stdClass::$DiscussionID in /.../vanillaroot/library/Vanilla/Vanilla.Control.DiscussionForm.php on line 124
$Context->Configuration['ATTACHMENTS_ALLOWED_FILETYPES'] = array (
'application/download' => array('rar', 'RAR')
'application/download' => array('rar', 'RAR', 'pdf', 'PDF')
'text/rtf' => array('rtf', 'RTF'),
? help please!
I'm using Vanilla 1.1.5a and Attachments 2.1. I had uploaded a few .pdf files without troubles. I was trying to upload another .pdf file, a got the following error message: When trying again I got the two additional PHP error messages at the top: And from then on I was getting the same error with other .pdf files.
I don't know why my pdf files are classified as "application/download". When checking them in Windows, they are perfectly normal pdf files (they start with the %PDF1.3 string). I don't know whether the browser or the server assigns a different type, nor why.
I turned around the problem by allowing files with extension "pdf" to be downloaded as application/download types. To do this, find the following line in extensions/Attachments/default.php: Below you'll find lists of allowed extensions for each file type. In my case I changed: into: I guess that rose should add a line for allowing RTF files: (Note that according to some references tables of MIME types, the right type for rtf should be application/rtf, so you may consider add a line for that to.)
If that way of working around the problem is ok, other people encoutering it should deal with it by adding lines/extensions for the MIME file type Vanilla mentions in the error message (text/rtf, application/download, etc.).