Community Support for OpenDocMan (Deprecated)

Full Version: uploading .exe files
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I would like to upload .exe files for support purposes. I can not seem to figure out how to add them to the approved documents string.

Any ideas?

Create or edit your config_local.php file:

Add this:
// List of allowed file types
// Pay attention to the "Last Message:" in the status bar if your file is being rejected
// because of its file type. It should display the proper MIME type there, and you can
// then add that string to this list to allow it
$GLOBALS['allowedFileTypes'] = array('image/gif', 'text/html', 'text/plain', 'application/pdf', 'application/x-pdf', 'application/x-lyx', 'application/msword', 'image/jpeg', 'image/pjpeg', 'image/png', 'application/msexcel', 'application/msaccess', 'text/richtxt', 'application/mspowerpoint', 'application/octet-stream', 'application/x-zip-compressed','image/tiff','image/tif','application/');

To add a new filetype, check the error in the status bar of opendocman when you try to upload the exe, and copy the filetype info from the message, and place it at the end of the config line above in your config_local.php
I'm trying to do something similar but with odt (Open office) files. I tried text/odt and that didn't work. I couldn't find anywhere where the file type was listed.

when the upload fails, you should see a message in the blue bar, on the right side of it. The message should show you what mime-type failed. That will be the mime-type to add.
Actually I figured it out with google searching. For future purposes, odt (a common format) is application/x-vnd.oasis.opendocument.text'

Now what's interesting is that it let me upload the original, and didn't reject it until I tried to do a Check in.
For future reference, there is a file in opendocman called mimetypes.php that contains a list of all the available mimetypes.
Is there any way on config.php just to include all these mime types?
You can create a config_local.php file like the example, and add them there.
Thanks! Good to know, I copied my config.php to config_local.php so I won't lose my settings on the next update Smile