The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Direct Link to Attachments
Is there any hack, or can one be done, that when a person uploads the attachment via the normal upload system, the link in the corresponding post, shows up as a direct link to the file, not a php string driven url?
Like, you upload, and then it shows http://yoursite.com/attachments/file.jpg etc etc? I am trying to reduce overall stress on my server by removing unnecessary database calls. I know I will lose tracking stats related to attachments, but, I really do not care about that at the moment. I think if this system is in place, placing an anti-remote file linking setting will also work. Thanks in advance. EDIT: In relation to images, I would like the thumbnail system to stay in affect, so in theory the hack would produce Code:
<a href="http://www.yoursite.com/attachments/file.jpg"><img src="http://www.yoursites.com/attachments/filethumb.jpg"></a> |
#2
|
|||
|
|||
bump
anything? |
#3
|
|||
|
|||
Do you have your attachments stord in the database, or in the file system?
|
#4
|
|||
|
|||
file system
i looked in the folder, and they are just a string of code, file names get removed and no extentions. |
#5
|
||||
|
||||
Then there is almost no stress being placed on the system via the attachment systems.
|
#6
|
|||
|
|||
They will have the attachmentid as name i think.
And they are stored in a subdirectory based on teh userid: User id: 54321 Directory: images/attach/5/4/3/2/1/ |
#7
|
||||
|
||||
Quote:
The attachments are stored as .attach and .thumb (for thumbnails) so there is no way to direct link to them without re-writing the entire system almost. Ontop of all that you'd lose any sort of permissions you had on attachments if someone knew the url. |
#8
|
|||
|
|||
Thanks guys, I figured what you said was true but just checking.
The main thing that kills us regarding attachments is that we are using a portal system on the main page, and when hot or new images are released, everyone loads that page and clicks the thumbnail, even if we have the full gallery in a non DB/VB system. Once we stopped using thumbs on main page via the attachment system, the crashes became less frequent immediately. I rigged a form upload with auto thumb creation in the newthread bit which only admins/staff can see, and it outputs the thumb-with-link-to-full code, so they can copy paste it into thread. 1 extra step than regular attach file process via VB. Looks same to users, better for server. If we are going to get slammed with image requests, Id rather not have to access the DB period. That is.... Am I correct in thinking that when attachment.php is called, it has to access the physical file location in the DB and then load the image/file into the browser? |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|