CodeIgniter Forums
How to implement a pic server? - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: How to implement a pic server? (/thread-1784.html)

How to implement a pic server? - El Forum - 06-26-2007

What is the correct way of implementing this type of setup? My best guess is that i should POST to a upload specific ci installation on the pic server that would deal with all file uploads. But then i would have to make a connection to my db.. hmmm, things will get a little more complicated.

..discuss Smile

How to implement a pic server? - El Forum - 06-27-2007

Why that complicated? Why not just one CI setup with DB in which you store the image data en FTP the image to the pic server? This way your pic server will be dedicated and your application server aswell

I don't see the need to mix seperate functionality.

1: upload
2: store image data in DB (including image location)
3: store image in tmp dir
4: ftp image to pic server ( in specific location? )

Above odering might not be the best.

How to implement a pic server? - El Forum - 06-27-2007

i do not want to use double the bandwidth on a single image. the point is for my application server bandwidth to be solely dedicated to generated html. Also, the pictures i'm referring to are user uploaded.

How to implement a pic server? - El Forum - 06-27-2007

So is it safe to say the servers are on different locations or at least not connected to each other? That would have made things a lot simpler.

As for user upload, that shouldn't make a difference. It al depends on how you process the upload.

Back to your question:

I would create an upload form with the action pointing towards the picserver and an ajaxcall from the picserver to the applicationserver with details of the uploaded image.

you would still need 2 CI installations but the picserver only needs a simple upload routine and an ajax call.