Quote:
Originally Posted by Sebastian
anyone telling you they have attachments on a different server, db on another and web on another is probably BSing you.
why? for one, not your average coder can do it, and even if they did, it would most likely not work with vb permissions. again, it certainly possible, just not with permissions and it would require a sh!t load of hacking to the attachment file..
|
Hey hey,
This is easily possible, I recommend this strategy:
1) Keep everything the same on your main server
2) Write a program that runs on your other server that does this:
> periodically connect to your main server's SQL server.
> search for files in the attachment table that are not blank
> copy the file to the other server
> make that file's contents in the attachment table blank
Now your files are 'moved' onto your other server, while maintaining the relational links in your main server's SQL.
To allow downloads, adjust vB's download attachment logic to this:
If the file in the attachments table isn't blank, push a direct download, else generate some access key (e.g. sha1(fileid+userIP+secretkey)) and redirect the a script on your other server that checks the key, and allows the download from there;
You could imagine using a scheme like this:
otherserver.com/download.php?fileid=230&key=<some hashed or encrypted value>
hope you are inspired!
Tom