View Full Version : Figuring out attachments
08-23-2007, 07:38 PM
Somewhere in this forum is a setting on where to store the attachments. I want to store them outside of the forum database.
I need to work on how big the files can be and how big they appear in the posts.
I also need to figure out if I can limit how big peoples images show in the forum when they are use the img tags.
Anyone have any experience with any of that?
08-23-2007, 07:42 PM
Ok, I'm dumb. I figured out how to change the attachment storage location.
08-23-2007, 07:54 PM
If you are moving attachments into the file system, it is recommended that you do *not* place the folder under your web root (usually named If you are moving attachments into the file system, it is recommended that you do *not* place the folder under your web root (usually named public_html or www or www_root) because people will be able to bypass vBulletin's permission system and download them. Also, you will need to make the folder writeable by PHP. The easiest way to do this is CHMOD it 777 (consult your FTP, Telnet, or SSH documentation for more info on how to do this). We do not recommended that you put a folder that is CHMODed 777 under your web root - another good reason to have it located above the document root.
or www or www_root) because people will be able to bypass vBulletin's permission system and download them. We do not recommended that you put a folder that is CHMODed 777 under your web root - another good reason to have it located above the document root.
I'm not grasping this.
Are they saying if my root is www/public_html/trs/forums to put it in www/somethingelse/storage and not www/public_html/storage ?
This is why I'm considering this:
vBulletin provides you with two options for storing post attachments: 1) you can store them in the database or 2) you can store them in the file system on your web server. Both methods have advantages and disadvantages. The database is more efficient with storage space and is easier to backup than individual files. However, storing attachments in the database is also an extra burden on the database when users download attachments. Other considerations include how you want to restrict access to attachments, whether you want to use vBulletin's permission system or directory permissions like htaccess.
I'm wondering if storing them outside of the database will keep the forum from slowing from users downloading attachments.
I would store them outside of the database for a variety of reasons like ease of management, you could easily move and get rid of them at any time, who knows what someone might try to attach (and be successful at!) etc etc.
Also, it sounds like they want the folder at part of your storage that is not web accessible to outsiders. Example...
You SFTP into your web space and see
The .htaccess file should NOT be accessible by going to www.blah.com/.htaccess ebcause that www.blah.com should actually point to the WWW folder. People wouldn't be able to just "surf" to that .htaccess file or in this case the attachment folder. Something on the server could access it (like the vBulletin system).
Does that make sense? It's a little bit of a sloppy explanation but I'm pretty certain that is what they want you to do.
vBulletin® v3.8.6, Copyright ©2000-2013, Jelsoft Enterprises Ltd.