Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Attachments 2.1
I've released a new version with some minor, but useful changes:
Version 2.1 - 20.12.2006, Jazzman
- Removed version check as it isn't really necessary
- Added new SaveAsDialog function which allows filenames with spaces
- Fixed a security issue, where discussion attachments could be downloaded by any user (even if you weren't able to view the discussion itself) by just altering the URL and attachment number (Thanks to jaz!)
Download: Attachments 2.1
Upgrade notes: just copy the files over your existing installation.
Version 2.1 - 20.12.2006, Jazzman
- Removed version check as it isn't really necessary
- Added new SaveAsDialog function which allows filenames with spaces
- Fixed a security issue, where discussion attachments could be downloaded by any user (even if you weren't able to view the discussion itself) by just altering the URL and attachment number (Thanks to jaz!)
Download: Attachments 2.1
Upgrade notes: just copy the files over your existing installation.
0
Comments
But how do I configure it to allow for different types of attachment extensions?
Like I would like to be able to upload an MP3 (a legal one) for my board members to download or even a video clip (yes, legal one again) but it won't allow those type of files to be attached.
Go into your default.php and where you see this:
$Context->Configuration['ATTACHMENTS_ALLOWED_FILETYPES'] = array ( 'image/gif' => array('gif', 'GIF'),
That's what you'd edit. Then, its just a matter of testing. I setup my forum to allow .odt, .ods, .xls and .htm/.htmlBut, to do that, I needed to first test it by uploading the file I wanted to be able to accept, see what it named the filetype, and then past that into the first section, such as moving my .odt into the octet-stream rather then msword.
'application/vnd.ms-excel' => array('xls', 'XLS'),
For Open Office documents and spreadsheets, just tack it onto the octet-stream:
'application/octet-stream' => array('rar', 'RAR', 'doc', 'DOC', 'ods', 'ODS', 'odt', 'ODT', 'ttf', 'TTF'),
This one was for HTML. However, it currently doesn't work:
'application/text/html' => array('html', 'HTML', 'htm', 'HTM', 'xml', 'XML')
I'm not sure what I should be putting in there for text/html. I tried just text. I tried just html. I tried text/html. Nothing. So, maybe someone smart can post it in here?Is there not a way to write a single extension in the array and make it case insensitive?
Same problem, still not working... :-(
I am new to Vanilla and trying to get Attachments 2.1 and inline images working on Vanilla 1.0.3
Have set permissions for upload folder on server to read and write but still no joy.
Can anyone talk me through the installation. I am with MediaTemple as a server.
At present it sees the file when I select it on the add topic window but when I click add comment it seems to not be able to find or load the attachment adn it does not show in the bulletin board.
Thanks for any help.
You can email me direct at; brian@briancairns.com
$AttachmentManager->DiscussionID = $Discussion->DiscussionID; $AttachmentManager->Comment = &$Discussion->Comment; $AttachmentManager->SaveAttachments();
toif(isset($Discussion->DiscussionID)){ $AttachmentManager->DiscussionID = $Discussion->DiscussionID; $AttachmentManager->Comment = &$Discussion->Comment; $AttachmentManager->SaveAttachments(); }
But i think it may be have some better fix.
BTW, thank you, Jazzman.