jrsweets Posted February 13, 2004 Posted February 13, 2004 I can't find the answer to this question anywhere. Am I able to specify what type of files the user can upload in their posts? I have allowed them to upload and, set the file size limits. I want to know what file types that can be uploaded and how to change (limit or add) the file types that are allowed. Any thoughts??? Quote
TCH-Bruce Posted February 13, 2004 Posted February 13, 2004 (edited) Open the Admin panel in IPB. Select System Setting --> Topics, Posts & Polls. Look for Valid postable image extensions and add to the existing extensions. Defaults are: gif,jpeg,jpg,png That should do it. Edited February 13, 2004 by TCH-Bruce Quote
jrsweets Posted February 13, 2004 Author Posted February 13, 2004 I tried that, still no luck. Get this message: THE FOLLOWING ERROR(S) WERE FOUND You cannot upload this type of file I was trying to allow a user to upload an mp3 file. Are those extension just for images or all files? It says postable images. Quote
TCH-Bruce Posted February 13, 2004 Posted February 13, 2004 You know I tried uploading an EXE file to my board and I got the same error. But it will take a ZIP file. I'll do more research to see if it can be changed to allow different file types. You may be limited to ZIP files since it converts the file to a .ibf extension Quote
jrsweets Posted February 13, 2004 Author Posted February 13, 2004 I'll try it out. So as long as the file is zipped, I should be able to upload it if I add zip to the list that you described? Thank you for the fast response. Quote
ThumpAZ Posted February 13, 2004 Posted February 13, 2004 This may be due to the fact that portable executables can run arbitrary code (malware or viruses), so IPB may have just blocked them all together for saftey reasons. Besides, the .zip files will be smaller than the uncompressed file, so it is better for you anyway -GG Quote
jrsweets Posted February 13, 2004 Author Posted February 13, 2004 What about mp3, rar, pdf or other extensions? Is there a way to change Invision to be able to add them. Quote
ThumpAZ Posted February 13, 2004 Posted February 13, 2004 I, Like Bruce, am not sure. mp3 is tyically reserved for download or streaming only, rar is jsut another compression type and PDF is also download only, but takes the adobe reader to view it. Let me look into this as well and I will return with feedback -GG Quote
TCH-Bruce Posted February 13, 2004 Posted February 13, 2004 (edited) OK, I found the file that controls the file types. It is called conf_mime_types.php and is located in the root folder of the forum. You should be able to upload PDF and Mp3. The .rar file types are not listed. I suppose you could edit the file if you knew exactly what to put in there. Edited February 13, 2004 by TCH-Bruce Quote
ThumpAZ Posted February 13, 2004 Posted February 13, 2004 (edited) I have been doing some reading around on the Internet and this seems to be a problem many folks have been having. I did see this code from that file that makes it appear that it won't work: <?php $mime_types = array( // mime allow post img type allow avatar "application/pdf" => array( 1, 'pdf.gif' , 'PDF Document' ) , "image/x-png" => array( 1, 'quicktime.gif' , 'PNG Image' ) , "video/vivo" => array( 1, 'win_player.gif', 'VIVO Movie' ) , "application/x-compress" => array( 1, 'zip.gif' , 'Compressed File') , "video/x-msvideo" => array( 1, 'win_player.gif' , 'MS Video' ) , "text/html" => array( 1, 'html.gif' , 'HTML Page' ) , "audio/x-pn-realaudio" => array( 1, 'real_audio.gif', 'Real Audio File') , "image/gif" => array( 1, 'gif.gif' , 'GIF Image' ,1 ) , "video/x-ms-wmv" => array( 1, 'win_player.gif', 'Windows Media Video' ) , "video/ms-wmv" => array( 1, 'win_player.gif', 'Windows Media Video' ) , "audio/x-ms-wma" => array( 1, 'mp3.gif' , 'Windows Media Audio' ) , "audio/ms-wma" => array( 1, 'mp3.gif' , 'Windows Media Audio' ) , "audio/basic" => array( 1, 'mp3.gif' , 'AU Audio File' ) , "video/mpeg" => array( 1, 'quicktime.gif' , 'MPEG Video' ) , "image/ico" => array( 1, 'gif.gif' , 'Icon File' ) , "application/x-tar" => array( 1, 'zip.gif' , 'TAR Ball' ) , "image/x-MS-bmp" => array( 1, 'bmp.gif' , 'BMP Image' ) , "image/tiff" => array( 1, 'quicktime.gif' , 'TIFF Image' ) , "text/richtext" => array( 1, 'txt.gif' , 'Rich Text' ) , "audio/x-realaudio" => array( 1, 'realaudio.gif' , 'Real Audio' ) , "application/mac-binhex40" => array( 1, 'stuffit.gif' , 'Mac Binary' ) , "audio/x-aiff" => array( 1, 'quicktime.gif' , 'AIFF File' ) , "application/x-gzip" => array( 1, 'zip.gif' , 'GZIP File' ) , "application/zip" => array( 1, 'zip.gif' , 'ZIP File' ) , "application/postscript" => array( 1, 'postscript.gif', 'Postscript' ) , "application/msword" => array( 1, 'word.gif' , 'MS Word doc' ) , "video/quicktime" => array( 1, 'quicktime.gif' , 'QuickTime Movie') , "application/powerpoint" => array( 1, 'apps.gif' , 'PowerPoint Doc' ) , "audio/x-wav" => array( 1, 'sound.gif' , 'WAV File' ) , "audio/x-mpeg" => array( 1, 'mp3.gif' , 'MPEG Audio' ) , "image/jpeg" => array( 1, 'jpeg.gif' , 'JPEG Image' ,1) , "application/x-zip-compressed" => array( 1, 'zip.gif' , 'ZIP File' ) , "application/octet-stream" => array( 1, 'quicktime.gif' , 'OCTET Stream' ) , "text/plain" => array( 1, 'text.gif' , 'Text File' ) , "image/pjpeg" => array( 1, 'jpeg.gif' , 'JPEG Image' ,1) , ); ?> You might try adding this into the code of that file, but be sure to back up your original: "audio/mp3" => array( 1, 'mp3.gif' , 'MPEG audio' ) , Edited February 13, 2004 by TCH-Glenn Quote
TCH-Bruce Posted February 13, 2004 Posted February 13, 2004 There seems to be a problem with the array types. I was able to upload a pdf file but no to wav and mp3 files. Quote
ThumpAZ Posted February 13, 2004 Posted February 13, 2004 The array types are very specific apparently. I was reading and saw that there are like 4 different types you need to enter just for rar files. If you know the different types, and what they need to be opened with, you can simply edit the php file to allow for those types. Bruce, my bet would be that you have encountered that level of accuracy that this file requires to operate correctly. -GG Quote
TCH-Bruce Posted February 13, 2004 Posted February 13, 2004 Glenn, I was just testing file types for jrsweets. ZIP files are the only types of files I need to upload on my board so I am content. I would have preferred to be able to upload a self extracting ZIP file (EXE) but it wouldn't let me. So I will settle for ZIP. I can get around it by putting the self extracting file inside of a ZIP file. Quote
jrsweets Posted February 13, 2004 Author Posted February 13, 2004 I will instruct everybody just to use zipped files, no biggie. I just thought that there might be an easy way to add new file types. Thanks for all the help guys. Quote
ThumpAZ Posted February 13, 2004 Posted February 13, 2004 Bruce, Gonna use a zipzip? that is definitely the way to go. jrsweets, the use of the zip files is definitely a better solution. mp3 and other streamable files will send your bandwidth through the roof. Quote
jrsweets Posted February 13, 2004 Author Posted February 13, 2004 Your right thanks for the input. I will just tell everyone to use ZIP files. Thanks again. Quote
jrsweets Posted February 14, 2004 Author Posted February 14, 2004 Just an update, I found this http://www.invisiontools.com/index.php/pg/hosted-advmime It automatically edits the config file to allows any type of upload that you want. It may be helpful. Quote
TCH-Bruce Posted February 14, 2004 Posted February 14, 2004 I get an error trying to load that link. Quote
TCH-Don Posted February 14, 2004 Posted February 14, 2004 Bruce, it was there earlier, looked interesting, so i marked it for later. (maybe they need a better host ) Quote
TCH-Bruce Posted February 14, 2004 Posted February 14, 2004 Tried again and got it this time. I bookmarked it also. Yeah, they could use a better host! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.