How to store the attachements on different host ?

Started by hahoangthoa, February 24, 2007, 12:03:31 PM

Previous topic - Next topic

hahoangthoa

What should i do if i want to store attachments on different host ?
Please help me !

jkrlvgn

...well....attachments as in files, pictures, etc?

I'd go more for just linking stuff in...like...

Click here for QFire file!

OR



Or....just link it like: AIM Logo

And there ya go...it's not exactly what you're looking for...but it's still a file...and it's still linked on the post...unless I'm missing the whole point of an attachment, ya know?

Peter Duggan

Merged your topics. (Please don't cross-post because it's counter-productive!)

hahoangthoa

#3
It mean that i want to attachment (zip, rar, picture,...) to different host.
Because my site in a fast host but space not enough. So i want everybody when they attach some file on my forum, that file will be attach on another host with more space.

LiroyvH

Then why not move your complete site over to that host?
Obviously if it's about speed, then linking attachments from another host wont really help in the good performance of your server.

I'm not sure if it's possible to store attachments on another server.
((U + C + I)x(10 − S)) / 20xAx1 / (1 − sin(F / 10))
President/CEO of Simple Machines - Server Manager
Please do not PM for support - anything else is usually OK.

hahoangthoa

But the host where i host forum is too fast, i don't want to move all thing to something else !
Any solution for this problem ?

SleePy

When SMF uploads the files it uploads via php into your attachments directory.
And it also does this for finding file sizes and non existing links to the attachment (topic was deleted but not attachment).

The only way I see this possible is to modify the Attachment Functions that Upload and display it to do a FTP connection to the other host and retrieve the file temporally.
The display one is in Display.php and the Uploading one I believe is in Post.php or Subs-Post.php

But doing this is out of my knowledge of php coding. You might want to ask around in coding discussion or other places for this sort of thing.

If you need help understanding the SMF functions feel free to visit our function database in http://support.simplemachines.org/function_db/
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

hahoangthoa

I think, that is big problem. To solve that problem may be got a lot of time. I think it could be great if someone can make a Mod for this.

I think if could be insert a FTP account option (host, user, pass, path) to store attachment to different host.  

Advertisement: